From 465f42bbe4d77444c30a9ffea8faebb794c2596f Mon Sep 17 00:00:00 2001 From: Joel Brobecker Date: Thu, 23 Apr 2009 18:49:20 +0000 Subject: [PATCH] * stack.c (do_gdb_disassembly): Print the exception message if an error was thrown while trying to perform the disassembly. --- gdb/ChangeLog | 5 +++++ gdb/stack.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9cadc1541ad..a6917cb059e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-04-23 Joel Brobecker + + * stack.c (do_gdb_disassembly): Print the exception message if an + error was thrown while trying to perform the disassembly. + 2009-04-22 Jan Kratochvil * varobj.c (free_variable): Replace free_current_contents by xfree. diff --git a/gdb/stack.c b/gdb/stack.c index f7bb81ecf1f..868111abab7 100644 --- a/gdb/stack.c +++ b/gdb/stack.c @@ -507,6 +507,10 @@ do_gdb_disassembly (int how_many, CORE_ADDR low, CORE_ADDR high) { gdb_disassembly_stub (&args); } + /* If an exception was thrown while doing the disassembly, print + the error message, to give the user a clue of what happened. */ + if (exception.reason == RETURN_ERROR) + exception_print (gdb_stderr, exception); } /* Print information about frame FRAME. The output is format according -- 2.30.2