aboutsummaryrefslogtreecommitdiff
path: root/gdb/stack.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-03-18 18:48:56 +0000
committerPedro Alves <palves@redhat.com>2011-03-18 18:48:56 +0000
commit1d4f574102b243b00dead2f2ed9493c812cc07c9 (patch)
treeeb0c5b1bbff443c04ac16f531aa5ad5d54dab557 /gdb/stack.c
parentdba09041c7c7ac429ebc414c10a9d8ce8472f265 (diff)
downloadgdb-1d4f574102b243b00dead2f2ed9493c812cc07c9.zip
gdb-1d4f574102b243b00dead2f2ed9493c812cc07c9.tar.gz
gdb-1d4f574102b243b00dead2f2ed9493c812cc07c9.tar.bz2
gdb/
* stack.c (print_frame_local_vars, print_frame_arg_vars): Handle unavailable PC.
Diffstat (limited to 'gdb/stack.c')
-rw-r--r--gdb/stack.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/stack.c b/gdb/stack.c
index dba77d4..0888b69 100644
--- a/gdb/stack.c
+++ b/gdb/stack.c
@@ -1629,6 +1629,14 @@ print_frame_local_vars (struct frame_info *frame, int num_tabs,
{
struct print_variable_and_value_data cb_data;
struct block *block;
+ CORE_ADDR pc;
+
+ if (!get_frame_pc_if_available (frame, &pc))
+ {
+ fprintf_filtered (stream,
+ _("PC unavailable, cannot determine locals.\n"));
+ return;
+ }
block = get_frame_block (frame, 0);
if (block == 0)
@@ -1781,6 +1789,13 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
{
struct print_variable_and_value_data cb_data;
struct symbol *func;
+ CORE_ADDR pc;
+
+ if (!get_frame_pc_if_available (frame, &pc))
+ {
+ fprintf_filtered (stream, _("PC unavailable, cannot determine args.\n"));
+ return;
+ }
func = get_frame_function (frame);
if (func == NULL)