public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Alert: SPARClite gdb bux (and fix)
@ 1999-07-08 11:29 Gene Kozin
  1999-07-08 11:42 ` Stan Shebs
  0 siblings, 1 reply; 5+ messages in thread
From: Gene Kozin @ 1999-07-08 11:29 UTC (permalink / raw)
  To: eCos Mailing List

The following bug has been found in SPARClite gdb from the
99-03-19 release of eCos tools (ecosSWtools-990319):

Description:
-----------
When connecting to Fujitsu SPARClite evaluation board, gdb
aborts with the following error message: "Magic number of
sparclite target struct wrong".

The said error message is emitted by the function
push_target() (target.c, line 523) if verification of the
target_ops structure fails.  The failure occurs when
function sparclite_open() calls push_target() with
&sparclite_ops as an argument (see sparcl-tdep.c, line 508).

This happens because initialization of the sparclite_ops
structure (see sparcl-tdep.c, line 836) is incorrect.
Particularly, initialization of the to_has_thread_control
field (see target.h, line 318) is missing.  As a result,
OPS_MAGIC (3840) ends up in the wrong field
(to_sections_end instead of to_magic), causing push_target()
to fail.

How to repeat:
--------------
1. Run sparclite-elf-gdb
2. Connect to the Fujitsu evaluation board:

        (gdb) target sparclite com2

3. gdb aborts with to following message:

        [SPARClite appears to be alive]
        Magic number of sparclite target struct wrong

How to fix:
-----------
To fix the problem, apply the following patch to
.../src/gdb/sparcl-tdep.c file:

-----< patch-start >----------------------
876d875
<   0,    /* to_has_thread_control */
-----< patch-end >------------------------


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-07-12  4:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-08 11:29 [ECOS] Alert: SPARClite gdb bux (and fix) Gene Kozin
1999-07-08 11:42 ` Stan Shebs
1999-07-09  8:30   ` [ECOS] Re: ecos/20273 " Hugo Tyson
1999-07-09 11:33     ` Gene Kozin
1999-07-12  4:15       ` Hugo Tyson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).