From: muller Date: Wed, 6 May 2009 15:52:10 +0000 (+0000) Subject: * Adapt to read_pc function removal. X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=73cfc078fdaf0a8e0438f623f7ab11d5fbb08ff0;p=pf3gnuchains%2Fpf3gnuchains3x.git * Adapt to read_pc function removal. * generic/gdbtk-cmds.c: Add "cache.h" include. (gdb_loc): Use regcache_read_pc instead of read_pc. --- diff --git a/gdb/gdbtk/ChangeLog b/gdb/gdbtk/ChangeLog index 5657876159..e053317933 100644 --- a/gdb/gdbtk/ChangeLog +++ b/gdb/gdbtk/ChangeLog @@ -1,3 +1,9 @@ +2009-05-06 Pierre Muller + + * 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 * library/vartree.itb (constructor): Remove the borderwidth 0 diff --git a/gdb/gdbtk/generic/gdbtk-cmds.c b/gdb/gdbtk/generic/gdbtk-cmds.c index f390133364..dc0b17c5c5 100644 --- a/gdb/gdbtk/generic/gdbtk-cmds.c +++ b/gdb/gdbtk/generic/gdbtk-cmds.c @@ -44,6 +44,7 @@ #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. */ @@ -2141,10 +2142,13 @@ gdb_loc (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST obj 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 @@ -2152,12 +2156,12 @@ gdb_loc (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST obj 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); } }