+2009-05-06 Pierre Muller <muller@ics.u-strasbg.fr>
+
+ * Adapt to read_pc function removal.
+ * generic/gdbtk-cmds.c: Add "cache.h" include.
+ (gdb_loc): Use regcache_read_pc instead of read_pc.
+
2009-04-23 Keith Seitz <keiths@redhat.com>
* library/vartree.itb (constructor): Remove the borderwidth 0
#include "language.h"
#include "target.h"
#include "valprint.h"
+#include "regcache.h"
/* tcl header files includes varargs.h unless HAS_STDARG is defined,
but gdb uses stdarg.h, so make sure HAS_STDARG is defined. */
else
{
struct frame_info *frame;
+ CORE_ADDR frame_pc, current_pc;
frame = get_selected_frame (NULL);
-
- if (get_frame_pc (frame) != read_pc ())
+ current_pc = regcache_read_pc (get_current_regcache ());
+ frame_pc = get_frame_pc (frame);
+
+ if (frame_pc != current_pc)
{
/* Note - this next line is not correct on all architectures.
For a graphical debugger we really want to highlight the
Many architectures have the next instruction saved as the
pc on the stack, so what happens is the next instruction
is highlighted. FIXME */
- pc = get_frame_pc (frame);
+ pc = frame_pc;
find_frame_sal (frame, &sal);
}
else
{
- pc = read_pc ();
+ pc = current_pc;
sal = find_pc_line (pc, 0);
}
}