Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [RFA] Fix "Segmentation fault" when "gdb -v"
Date: Thu, 04 Mar 2010 07:26:00 -0000	[thread overview]
Message-ID: <20100304072620.GJ2832@adacore.com> (raw)
In-Reply-To: <daef60381003032250j42f46f4cqacf0ba2975fb9b6d@mail.gmail.com>

> All of this code use "printf_filtered".  But this function must be
> call after "interp_set".
> But this part of code call before "interp_set".

I think that this was an unforseen side-effect of a recent change.
IMO, it's better to get rid of this side-effect (needing the interpreter
to be set) in printf_filtered.

We should NOT change printf_filtered into printf_unfiltered in this case
because the same function is used in two different situations:
  - when the user uses -v
  - when the user types "show version"
In the latter case, the printf_filtered is appropriate.

Now, we need to decide whether pagination should be enabled if
the interpreter is not set. I think it makes sense to disable pagination
in this case.  If the interpreter is not set yet, we're just printing
stuff on stdout, we haven't started the interactive session (if any) yet...

-- 
Joel


  reply	other threads:[~2010-03-04  7:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04  6:50 Hui Zhu
2010-03-04  7:26 ` Joel Brobecker [this message]
2010-03-04  8:06   ` Hui Zhu
2010-03-04 13:45     ` Daniel Jacobowitz
2010-03-04 14:02   ` Pedro Alves
2010-03-04 14:59     ` Pedro Alves
2010-03-05  4:59       ` Joel Brobecker

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=20100304072620.GJ2832@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=teawater@gmail.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