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]

[obv] entry-values debug: Fix PC 0x0 output


Hi,

with "set debug entry-values 1" GDB could sometimes print
	Unable to find function for PC 0x0
instead of the valid PC it could not resolve.

Normally such error also should not happen; but that will be a different
patch.

Checked in as obvious.


Jan


http://sourceware.org/ml/gdb-cvs/2013-03/msg00006.html

--- src/gdb/ChangeLog	2013/03/01 15:38:23	1.15196
+++ src/gdb/ChangeLog	2013/03/01 21:18:18	1.15197
@@ -1,3 +1,8 @@
+2013-03-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+	* dwarf2loc.c (call_site_find_chain_1): New variable save_callee_pc,
+	use it.
+
 2013-03-01  Pedro Alves  <palves@redhat.com>
 
 	Use gdb_byte for bytes from the program being debugged.
--- src/gdb/dwarf2loc.c	2013/01/31 18:37:37	1.164
+++ src/gdb/dwarf2loc.c	2013/03/01 21:18:21	1.165
@@ -793,6 +793,7 @@
 call_site_find_chain_1 (struct gdbarch *gdbarch, CORE_ADDR caller_pc,
 			CORE_ADDR callee_pc)
 {
+  CORE_ADDR save_callee_pc = callee_pc;
   struct obstack addr_obstack;
   struct cleanup *back_to_retval, *back_to_workdata;
   struct call_site_chain *retval = NULL;
@@ -811,7 +812,7 @@
   callee_pc = get_pc_function_start (callee_pc);
   if (callee_pc == 0)
     throw_error (NO_ENTRY_VALUE_ERROR, _("Unable to find function for PC %s"),
-		 paddress (gdbarch, callee_pc));
+		 paddress (gdbarch, save_callee_pc));
 
   back_to_retval = make_cleanup (free_current_contents, &retval);
 


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