This is the mail archive of the insight@sourceware.org mailing list for the Insight 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]

RE: Insight broken with latest tcl/tk


 I wrote a minimal patch...
allows insight to compile again...
Should I commit it?

Pierre Muller
Pascal language support maintainer for GDB

PS: It compiles but is still unusable on my cygwin machine :(

> -----Message d'origine-----
> De?: insight-owner@sourceware.org [mailto:insight-owner@sourceware.org]
> De la part de Keith Seitz
> Envoyé?: Wednesday, May 06, 2009 5:30 PM
> À?: Gene Smith
> Cc?: insight@sources.redhat.com
> Objet?: Re: Insight broken with latest tcl/tk
> 
> Gene Smith wrote:
> 
> >> ../../insight_sources/gdb/gdbtk/generic/gdbtk-cmds.c: In function
> ?gdb_loc?:
> >> ../../insight_sources/gdb/gdbtk/generic/gdbtk-cmds.c:2147: error:
> >> implicit declaration of function ?read_pc?
> >> make[2]: *** [gdbtk-cmds.o] Error 1
> [snip]
> > gdbtk-cmds.c:(.text+0x3503): undefined reference to `read_pc'
> > gdbtk-cmds.c:(.text+0x3533): undefined reference to `read_pc'
> > collect2: ld returned 1 exit status
> 
> These are the same problem. On May 5 (yesterday), someone checked in a
> patch to remove read_pc. It is now apparently called
> "regcache_read_pc".
> 
> I'll fix this later today. Busy morning.
> 
> Keith
ChangeLog entry:

2009-05-06  Pierre Muller  <muller@ics.u-strasbg.fr>

        * Adapt to read_pc function removal.
        * genric/gdbtk-cmds.c: Add "cache.h" include.
        (gdb_loc): Use regcache_read_pc instead of read_pc.


$ cvs diff -up gdbtk/generic/gdbtk-cmds.c
Index: gdbtk/generic/gdbtk-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/generic/gdbtk-cmds.c,v
retrieving revision 1.109
diff -u -p -r1.109 gdbtk-cmds.c
--- gdbtk/generic/gdbtk-cmds.c  6 Apr 2009 23:33:32 -0000       1.109
+++ gdbtk/generic/gdbtk-cmds.c  6 May 2009 15:39:45 -0000
@@ -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_Inte
       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_Inte
                 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);
            }
        }


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