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: gdb Digest 6 Sep 2007 17:34:52 -0000 Issue 2438


Hello,

     How to choose the address when load with add-symbol-file? Is the
whole 4G virtual address available, assume not conflict with the address
of the debugging code?
     I tried load the symbol to virtual address 0, and GDB tells me that
it can not access that memory.

Thanks
robert


> ------------------------------------------------------------------------
>
> 主题:
> Re: add-symbol-file question
> 发件人:
> Daniel Jacobowitz <drow@false.org>
> 日期:
> Wed, 5 Sep 2007 22:40:26 -0400
> 收件人:
> "Mentat K." <mentat79@gmail.com>
>
> 收件人:
> "Mentat K." <mentat79@gmail.com>
> 抄送:
> gdb@sourceware.org
>
>
> On Wed, Sep 05, 2007 at 07:30:23PM -0400, Mentat K. wrote:
>> Hello,
>> I am debugging a core that was generated from an app that was compiled
>> with gcc 3.2 with -O2 (but without -g). All the shared object libs
>> that it links with were similary compiled with -O2 without -g
>>
>> One of the shared object libs has a class and I know the address in
>> the core file where an object of this class resides. I want to print
>> out this object without doing the byte arithmetic myself.
>>
>> What would be the simplest way of doing this?
>
> If all you need is that type, build the definition of the type with
> -g into a new object file.  Load it with add-symbol-file at an out of
> the way address so that it does not overlap the code you care about.
> Then you should be able to use the class name and type.
>
> You have to be sure that debug info for the class is in the file you
> compile; sometimes it isn't, with G++.
>
>
>
> ------------------------------------------------------------------------

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