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: teaching gdb about new types?


If you're worried about types rather than line numbers, I would think that all you'd need is a symbol table that has the right type definitions in it.  If you know what they are supposed to be, you can supply such a symbol table easily enough.  

	paul


On Apr 29, 2011, at 4:42 PM, Richard Silverman wrote:

> On Fri, 29 Apr 2011, Paul Koning wrote:
> 
>> The simple answer is to get a copy of libc.so with debug symbols, and load that symbol table.  You don't have to replace the library itself to do that.
>> 
>> 	paul
> 
> I know, thanks; but the host is Solaris, and Oracle doesn't appear to provide this (although I'm pursuing it with them.).  I could also build the OpenSolaris libc and hope they're close enough.  However, it really seems as if one ought to be able to do what I described.
> 
> - Richard
> 
>> On Apr 29, 2011, at 2:36 PM, Richard Silverman wrote:
>> 
>>> Hello,
>>> 
>>> This seems as if it should be simple, but I can't find an answer.  I would like to teach gdb about new types relevant to the program being debugged, which are not among the debugging info in the program.  A concrete example: I have a program which uses pthreads from libc.  It calls:
>>> 
>>>      int pthread_cond_wait(pthread_cond_t *restrict cond,
>>>          pthread_mutex_t *restrict mutex);
>>> 
>>> ... and the argument types are defined in system header files.  But libc.so has no debugging info, so gdb doesn't know about these types, and can't interpret the arguments for me.  How can I teach gdb about these types?
>>> 
>>> Thanks,
>>> 
>>> - Richard
>> 
>> 
>> 


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