This is the mail archive of the gdb-prs@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]

[Bug python/18567] Frame filters apply to 'backtrace' but not 'frame' command


https://sourceware.org/bugzilla/show_bug.cgi?id=18567

--- Comment #6 from Tom Tromey <tromey at sourceware dot org> ---
(In reply to Pedro Alves from comment #3)

> With frame filters, a similar thing sounds like would be needed.  If you
> backtrace and see:
> 
> (gdb) bt
> #0  0x0000000000400501 in foo () at foo.c:14
> #1  0x0000000000401000 in bar () at bar.c:32
> 
> ... and those were frames cooked by, or decorated by, a frame filter, then,
> I'd expect that if you "frame", gdb first shows:
> 
> #0  0x0000000000400501 in foo () at foo.c:14
> 
> and then if you do "up", then "frame", gdb shows:
> 
> #1  0x0000000000401000 in bar () at bar.c:32
> 
> Does that make sense?

It does, but I'm not sure it is really what users will want.

Consider an "aggregating" frame filter.  An example here would be
Python (if it had a frame filter, which it can't due to a gcc bug) --
in Python, it might take multiple C stack frames to implement a single
Python interpreter stack frame.  And, the frame filter would represent
this by collapsing several C frames as the children of one Python frame,
like:

#0 ... something.py:99
  #1 ... something.c
  #2 ... somethingelse.c
#3 ... secondfile.py:10

etc

I would probably be confused if I was in frame #0 and typed "up"
and ended up in frame #3.

Also, one must consider that if frame filters apply to up and down,
then why not step, next, and finish?  And then you're in for some
difficult implementation stuff I think...

So, while I'm not against this -- I think it is necessary for the
long-term goal of interpreted language debugging --   I think it's
better to defer it to a future bug.

Up until now frame filters have been purely a display issue.  I
think it would be fine for them to remain as such, and just make
the output of "frame", stop notifications, etc, respect filtering;
without touching up/down/etc.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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