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: Registering pretty-printers


Daniel Jacobowitz wrote:

> On Thu, Jun 11, 2009 at 10:14:32AM -0700, Paul Pluzhnikov wrote:
>> Perhaps my proposal for ".gdb_py" section here:
>>   http://sourceware.org/ml/archer/2008-q4/msg00162.html
>> deserves another look?
>> 
>> Maybe we don't even need a separate section; just a convention that any
>> variable linked into executable, named "gdb_python_.*_source_me" and
>> containing ASCII be "python sourced" by GDB?
>> 
>> The Boost code could declare:
>> 
>>   const char gdb_python_Boost_Array_source_me[] = "...python code here...";
>> 
>> in the header, and voila: GDB knows how to print boost::array.
>> 
>> This could also be easily distributed separately from the library, and
>> the user will just have to link in gdb_boost_array_printer.c into his exe.
> 
> In my opinion, anything that increases the size of the executable is a
> non-starter.  I don't think there's any reliable way to create a
> non-allocatable section, and it would have other problems, like
> duplicate elimination.

Personally, I don't care about executable size much, but I find creating
custom source file and linking it into executable a very indirect method.
It is hard to implement from IDE side, too, because IDE can be used to
debug projects that are build by JRHackerBuildSystem, and be unable to
automatically add source files to build. My ultimate goal is allowing IDE
user to just specify 10 pretty-printer packages, and have them work on
every single project he's working on.

- Volodya



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