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]

Python, pretty printing, frame decorators and MI


Hi there, 

to ease debugging, I have a set of python pretty printers and frame
decorators - they work fine and print internal structures nicely. 

I also have a custom frontend using MI. I want to reuse these python
printers / decorators in the frontend. This way I don't need to
duplicate the code of pretty printer on top of MI. 

The problem is that if I enable pretty printing / frame filters in MI,
I no longer get the "raw" values, only pretty printed. 

For example, let's say I have a pretty printer for type OBJ (pointer to
a struct) which prints "0x12345678 (Symbol: #x:y:)" while without
pretty printer it would just print "0x12345678". 
Similar happens for frame decorators. Once I enable frame
filters/decorators, I no longer have access (on MI level) to raw
function name as in DRARF debug info. 

How difficult would be to extend MI to provide both representations? 
The idea is to provide another "property" with "raw" represenstation.
This way it'd be backward compatible as MI frontends are expected to
ignore unknown properties. 

Could you give me some pointers/hints where to look GDB code in order
to (try to) add this functionality?

Would it be also possible to allow Python to define new MI commands in
addition to CLI commands? 

Thanks.

Best, Jan


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