Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [CRIS] Reading core file selects "wrong" mach
@ 2004-12-01 14:00 Orjan Friberg
  2004-12-01 16:14 ` Randolph Chung
  2004-12-02 17:18 ` Mark Kettenis
  0 siblings, 2 replies; 10+ messages in thread
From: Orjan Friberg @ 2004-12-01 14:00 UTC (permalink / raw)
  To: gdb-patches, Hans-Peter Nilsson

When reading a CRISv32 Linux core file, the "wrong" mach is selected, causing 
cris_elf_grok_prstatus to not find the general-purpose registers (because unlike 
other ports it actually checks bfd_get_mach (abfd)).

The reason seems to be the call to bfd_default_set_arch_mach (abfd, ebd->arch, 
0) in elf_core_file_p in elfcore.h which will select the default mach for that 
arch.  Directly after this we start reading the core file which results in a 
call to cris_elf_grok_prstatus (which fails because the default mach doesn't 
match the current mach).

Is there an implicit assumption that the mach is not to be trusted when reading 
a core file?

(For reference: e_flags, checked in set_mach_from_flags, is hardcoded to 0 in 
the Linux kernel, but setting it correctly (to EF_CRIS_VARIANT_V32 in this case) 
wouldn't change a thing because of the above.)

-- 
Orjan Friberg
Axis Communications


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

end of thread, other threads:[~2005-01-14 18:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-01 14:00 [CRIS] Reading core file selects "wrong" mach Orjan Friberg
2004-12-01 16:14 ` Randolph Chung
2004-12-02 10:15   ` Orjan Friberg
2004-12-02 15:42     ` Randolph Chung
2004-12-02 17:18 ` Mark Kettenis
2004-12-13 15:12   ` Orjan Friberg
2004-12-13 16:09     ` Hans-Peter Nilsson
2004-12-13 20:22     ` Mark Kettenis
2005-01-14 17:10   ` Orjan Friberg
2005-01-14 18:40     ` Hans-Peter Nilsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox