From: Tom Tromey <tromey@redhat.com>
To: Phil Muldoon <pmuldoon@redhat.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch][python] 0 of 5 - Frame filters and Wrappers
Date: Wed, 05 Dec 2012 17:36:00 -0000 [thread overview]
Message-ID: <87624gtn81.fsf@fleche.redhat.com> (raw)
In-Reply-To: <50BF3E9D.4080403@redhat.com> (Phil Muldoon's message of "Wed, 05 Dec 2012 12:31:25 +0000")
>>>>> "Phil" == Phil Muldoon <pmuldoon@redhat.com> writes:
Tom> What is it that is inconsistent?
Phil> Just the naming. With MI, because it is a machine interface, option
Phil> length is not so important. So --no-frame-filters in the MI command
Phil> turns off a specific feature. However, "raw" in the "bt" command
Phil> does not turn off a specific function, or is ambiguous. I would
Phil> really like to think of an option name that is small enough not to be
Phil> painful to type, but meaningful and specific. I could not, so I just
Phil> highlighted it in the review.
Ok, thanks.
I do think it would be useful to have an option meaning "disable value
pretty printing for this bt". Perhaps that should be "raw" and we
should have a different name for this. Or maybe "raw" should mean both
-- since that would truly be "raw".
Phil> Well there are two steps. The actual filtering, this occurs when
Phil> frame filters operate on the frame iterator. Errors can occur
Phil> here, though I suppose the scope for that is considerably narrower
Phil> than in the printing phase. If an error occurs in this phase I think
Phil> (though the patch does not do this right now), we abandon the stack
Phil> trace with an error message of the name of the erroring filter, and
Phil> defer to GDB's inbuilt backtrace. For both MI and CLI. As no frames
Phil> have been printed yet, this would be fairly clear.
Filtering and printing, in most cases, have to be interleaved.
Otherwise I think there will be scaling issues.
The case where interleaving is not possible is when printing the tail
end of the stack trace: "bt -50". Here you have to save the last N
frames somewhere before printing.
Phil> At the printing step this is a different issue. At this point all of
Phil> the frame filters have executed. Now the Python code is printing out
Phil> the backtrace frame-by-frame with its own built-in routines according
Phil> to how each frame wrapper decorates each frame. I think an error
Phil> with the frame wrapper as you suggested, then moving onto the next
Phil> frame is probably best here?
I tend to think just erroring out immediately is ok.
A tool like ABRT ought to send both "bt full" and "bt full raw" anyway,
to avoid these kinds of potential problems; and users can react
accordingly easily enough -- just disable the printer and repeat the
command.
Tom
next prev parent reply other threads:[~2012-12-05 17:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-30 14:30 Phil Muldoon
2012-12-03 21:34 ` Tom Tromey
2012-12-05 12:31 ` Phil Muldoon
2012-12-05 17:36 ` Tom Tromey [this message]
2013-03-11 22:12 Phil Muldoon
2013-04-22 15:54 Phil Muldoon
2013-05-06 8:22 Phil Muldoon
2013-05-10 10:57 ` Phil Muldoon
2013-05-16 11:50 ` Joel Brobecker
2013-05-16 13:15 ` Phil Muldoon
2013-05-16 13:32 ` Tom Tromey
2013-05-16 13:35 ` Phil Muldoon
2013-07-17 20:27 ` Tom Tromey
2013-05-16 13:27 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87624gtn81.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=pmuldoon@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox