This is the mail archive of the gdb-patches@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: [patch] GDB 7.2: new feature for "backtrace" that cuts path to file (remain filename)


>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:

>> You could use Python to write a custom backtrace to do this.  But that
>> is neither here or there to this patch.

Joel> Yeah, I am wondering which way would be best. It seems like a Python
Joel> backtrace decorator would already work, or could be made to work.

We have a plan to implement "frame filters" in Python.  The idea here is
basically pretty-printing for backtraces -- let libraries ship Python
code to modify frames while they are being displayed.  E.g., the Python
interpreter could replace C frames with synthetic frames representing
the Python stack.

Full details are available somewhere -- either archer or gdb list
archives.  If you want to read them and can't find them, let me know,
and I will either dig them up or write them again.

Phil would have to say the status of this work.

Joel> So, there are pluses and minuses on both ends.  I am wondering
Joel> what everyone else thinks...

I am happy adding any vaguely sensible setting that people want to the
core.  Why not?  The time more minimalism has long passed.

Whether this one meets the bar, I don't know.  Is basename really the
obvious transform to apply?  What about just dropping the compilation
directory?

Joel> If we were to implement this in GDB itself, I'd rather go with
Joel> a setting rather than a command-line option. But that's just
Joel> a suggestion.

Definitely a setting and not a command-line option.

Tom


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