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]

Re: extending Gdb to display app specific data


Perhaps what you would like is a new output format specifiers to the
print and x commands? 

bstell@ix.netcom.com wrote:
> 
> My goal is to reduce the "initial
> cognitive learning barrier" and
> allow non experts to inspect data
> and help debug.
> 
> Eli Zaretskii wrote:
> > One way is to call the functions in the debuggee that convert these
> > strings to a printable representation, then print the result ...
> > Does that solve the problem?
> 
> If it can be put in a ".gdb_display_funcs"
> and the user can type "p unichar_ptr"
> and it works then that would be great.
> 
> Having to remember a display function puts
> the knowledge burden on the (non expert)
> user. The user has to know the data type
> and then know the display function.
> Imagine the frustration if one had to type
> "p display_string(ptr)" every time they
> wanted to see a ascii string.
> 
> In just the same way I'm looking for
> a way for the users not to have to
> remember "p display_unichar(unichar_ptr)".
> 
> Doesn't gdb already know the data type?

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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