Re: ELF program header table in MiniDebugInfo files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 05 Jun 2013 16:25:27 +0200, John Reiser wrote:
> On 06/05/2013 05:42 AM, Jan Kratochvil wrote:
> > Segments are irrelevant for symbols.
> 
> There is a problem with objdump and MiniDebugInfo and gdb treating ElfXX_Phdr
> records as "don't care".  The problem is that other parts of the debugging
> environment, including libunwind and humans, *do* care.

For separate debug info files segments do not make any sense.  Segments
describe only runtime data but .debug files has no runtime data.  The .debug
segments would need to be zeroed to be correct.  But that also does not seem
to be correct as then it would not match contents of the main ELF file anyway.


> It would be much better if I could say "add-symbol-file NAME &ElfXX_Ehdr"
> (because &ElfXX_Ehdr is relevant and easily known by me)
> but instead gdb requires "add-symbol-file NAME &.text".

I agree it would be a nice feature of GDB, submit a patch, please.


> Thus I must "shell objudmp --section-headers NAME  |  grep .text",
> select the offset, then add to the base address.  This is doubly tedious
> because gdb requires a literal constant and does not accept an expression
> for the ADDR.

BTW you need to specify address of very every section using add-symbol-file -s.
This is why there exist some scripts out there to automate it.


> The moral is:  Be nice to the downstream users of the data that you create.
> Honor the conventions of *all* the structs that you create, not just
> the ones that you yourself use.

Unfortunately here you mixed two completely unrelated topics.


Thanks,
Jan
-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux