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: [RFA] Fix "Segmentation fault" when "gdb -v"


> 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


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