public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: "Pierre Muller" <muller@ics.u-strasbg.fr>
To: "'Keith Seitz'" <keiths@redhat.com>, "'Gene Smith'" <gds@chartertn.net>
Cc: <insight@sources.redhat.com>
Subject: RE: Insight broken with latest tcl/tk
Date: Wed, 06 May 2009 15:46:00 -0000	[thread overview]
Message-ID: <000901c9ce61$be044430$3a0ccc90$@u-strasbg.fr> (raw)
In-Reply-To: <4A01ACFC.8000703@redhat.com>

 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);
            }
        }

  reply	other threads:[~2009-05-06 15:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-03 17:35 Dave Lawrence
2009-05-04 21:41 ` Kevin Buettner
2009-05-05  5:37 ` Gene Smith
2009-05-05 13:44   ` Gene Smith
2009-05-05 17:37     ` Kevin Buettner
2009-05-05 18:43       ` Gene Smith
2009-05-05 20:17         ` Kevin Buettner
2009-05-06  2:17           ` Gene Smith
2009-05-06  3:04             ` Gene Smith
2009-05-06  4:13 ` Gene Smith
2009-05-06  4:53   ` Gene Smith
2009-05-06 15:30     ` Keith Seitz
2009-05-06 15:46       ` Pierre Muller [this message]
2009-05-06 15:48         ` Keith Seitz
2009-05-06 15:53           ` Pierre Muller
2009-05-07  4:02             ` Gene Smith
2009-05-11 16:52               ` Dave Lawrence
2009-05-11 18:13                 ` Keith Seitz
2009-05-12  9:41                   ` Dave Lawrence
2009-06-14  4:40 ` Gene Smith
2009-06-15  3:56   ` Gene Smith

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000901c9ce61$be044430$3a0ccc90$@u-strasbg.fr' \
    --to=muller@ics.u-strasbg.fr \
    --cc=gds@chartertn.net \
    --cc=insight@sources.redhat.com \
    --cc=keiths@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).