This is the mail archive of the gdb@sourceware.org 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: linkmap from PT_DYNAMIC


Aleksandar Ristovski wrote:

> Currently GDB will scan dyntags from dynamic section only 
> (solib-svr4.c:scan_dyntag). However, if the section header 
> does not exist (for example it has been stripped away) then 
> gdb gives up, even though the section will be present in the 
> form of dynamic segment.
> 
> When examining core files when having only a stripped 
> executable (stripped in such a way that it does not contain 
> section headers), gdb will not be able to do much.
> 
> The attached patch will resort to using PT_DYNAMIC to get 
> dynamic section and scan dyntag. The patch will only change 
> default (current) behaviour if bfd_get_section_by_name 
> returns NULL.

Well, the scan_dyntag_auxv routine I added already does
attempt to access PT_DYNAMIC if there is no .dynamic
section.  In fact, it should work even if you do not
have any executable file at all, as it directly reads
the program headers from the target.

Is there some reason why this doesn't work for you?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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