This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdbarch_init called for core files, too?


Jason R Thorpe wrote:
> 
> On Thu, Apr 25, 2002 at 10:59:21AM -0700, Michael Snyder wrote:
> 
>  > Yeah, bfd has a few holes when it comes to recognizing core files.
>  > If you find one, fill it.  ;-)
> 
> Err, bfd recognizes the core file just fine.  But the core file doesn't
> have the same distinctive marks as the executable, although it does have:
> 
> Notes at offset 0x000002a8 with length 0x000002f4:
>   Owner         Data size       Description
>   NetBSD-CORE           0x0000009c      NetBSD procinfo structure
>   NetBSD-CORE@1         0x00000100      PT_GETREGS (reg structure)
>   NetBSD-CORE@1         0x00000108      PT_GETFPREGS (fpreg structure)
> 
> Now, the the annoying things is that the BFD section that these notes
> are located in is called:
> 
>  10 note10        000002f4  0000000000000000  0000000000000000  000002a8  2**0
>                   CONTENTS, READONLY
> 
> ...and the name changes based on how many sections preceed it.  Sure, I
> could use strncmp(), but it's still icky :-)

That's somewhat standard for bfd and corefiles.  The note sections are
numbered consecutively, and sometimes one note section is broken up 
into several pseudo-sections with special, meaningful names.  The 
sections with actual memory / data in them are also numbered
consecutively.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]