diff options
author | Gary Benson <gbenson@redhat.com> | 2014-08-05 11:42:21 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2014-08-29 10:11:59 +0100 |
commit | 2437fd32f17cb11338949cff1fd0741e14ce1681 (patch) | |
tree | 2bcf8bd5e476b038acf8db7cad7772fc949f298d /gdb/python | |
parent | 4805fc5533c158766d04f58af62bea884d624421 (diff) | |
download | gdb-2437fd32f17cb11338949cff1fd0741e14ce1681.zip gdb-2437fd32f17cb11338949cff1fd0741e14ce1681.tar.gz gdb-2437fd32f17cb11338949cff1fd0741e14ce1681.tar.bz2 |
Make internal_vproblem always work
internal_vproblem can be called (via malloc_failure) from almost the
first line of captured_main, but it will crash if called before the
first call to set_width. This commit makes internal_vproblem work
at any time.
There are two parts to this. If called before gdb_stderr is set up,
internal_vproblem will fall back to printing the message on regular
stderr and aborting. If called after gdb_stderr is set up but before
filtered printing is set up, internal_vproblem will operate as usual
except that it can not query whether to quit and/or dump core so it
defaults to doing both.
gdb/ChangeLog:
* utils.h (filtered_printing_initialized): New declaration.
* utils.c (abort_with_message): New function.
(internal_vproblem): Use abort_with_message for first level
recursive internal problems, and if gdb_stderr is not set up.
Protect calls to target_terminal_ours, begin_line and query.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions