Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
To: Jim Blandy <jimb@zwingli.cygnus.com>
Cc: msnyder@redhat.com, gdb-patches@sources.redhat.com, ac131313@cygnus.com
Subject: Re: [RFA] enum enable
Date: Tue, 31 Jul 2001 01:45:00 -0000	[thread overview]
Message-ID: <Pine.SUN.3.91.1010731114556.1042J-100000@is> (raw)
In-Reply-To: <nppuai80e4.fsf@zwingli.cygnus.com>

On 30 Jul 2001, Jim Blandy wrote:

> This patch still fails to build.

I'm stumped; did Patch say something about failed hunks?  Do you have
a broken version of Patch or something?  It looks like part of the
patch (see below) somehow didn't apply on your machine.

> The code your patch forgets to
> change has been present in the sources for over a year.  Did you do a
> full rebuild?

I did a full rebuild of the DJGPP port, so I could miss something in
files which aren't compiled in that version (although I grep'ed
everything).  But printcmd.c _is_ compiled for DJGPP, so I couldn't
possibly miss anything there.

> Here are the error messages:

I attach below, after the error messages, the part of patch for
printcmd.c, which clearly shows that _all_ of the lines for which GCC
complained on your machine should in fact have been patched by the
patch I posted.  How come it didn't work for you?

> gcc -c -g -O2    -I. -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/config -DHAVE_CONFIG_H -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../include/opcode -I/home/jimb/cygnus/src/sourceware/
gdb/main/src/gdb/../readline/.. -I../bfd -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../bfd  -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../include -I../intl -I/home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/../intl  -DMI_OUT=1 -DUI_OUT=
1 -Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized  /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:115: field `status' has incomplete type
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `display_command':
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: `enabled' undeclared (first use in this function)
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: (Each undeclared identifier is reported only once
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1436: for each function it appears in.)
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `do_one_display':
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1547: `disabled' undeclared (first use in this function)
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `disable_display':
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1647: `disabled' undeclared (first use in this function)
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `enable_display':
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1703: `enabled' undeclared (first use in this function)
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c: In function `disable_display_command':
> /home/jimb/cygnus/src/sourceware/gdb/main/src/gdb/printcmd.c:1741: `disabled' undeclared (first use in this function)
> make[1]: *** [printcmd.o] Error 1
> make[1]: Leaving directory `/gnomon/jimb/cygnus/pentium3/sourceware/gdb/main/native/build/gdb'
> make: *** [all-gdb] Error 2
> 
> Compilation exited abnormally with code 2 at Mon Jul 30 14:09:33
> 

Here's the patch for printcmd.c:

--- gdb/printcmd.c~0	Sat May 12 07:08:22 2001
+++ gdb/printcmd.c	Sat Jul 14 12:23:40 2001
@@ -111,7 +111,7 @@ struct display
     /* Innermost block required by this expression when evaluated */
     struct block *block;
     /* Status of this display (enabled or disabled) */
-    enum enable status;
+    int enabled_p;
   };
 
 /* Chain of expressions whose values should be displayed
@@ -1427,7 +1427,7 @@ display_command (char *exp, int from_tty
       new->next = display_chain;
       new->number = ++display_number;
       new->format = fmt;
-      new->status = enabled;
+      new->enabled_p = 1;
       display_chain = new;
 
       if (from_tty && target_has_execution)
@@ -1538,7 +1538,7 @@ do_one_display (struct display *d)
 {
   int within_current_scope;
 
-  if (d->status == disabled)
+  if (d->enabled_p == 0)
     return;
 
   if (d->block)
@@ -1638,7 +1638,7 @@ disable_display (int num)
   for (d = display_chain; d; d = d->next)
     if (d->number == num)
       {
-	d->status = disabled;
+	d->enabled_p = 0;
 	return;
       }
   printf_unfiltered ("No display number %d.\n", num);
@@ -1669,7 +1669,7 @@ Num Enb Expression\n");
 
   for (d = display_chain; d; d = d->next)
     {
-      printf_filtered ("%d:   %c  ", d->number, "ny"[(int) d->status]);
+      printf_filtered ("%d:   %c  ", d->number, "ny"[(int) d->enabled_p]);
       if (d->format.size)
 	printf_filtered ("/%d%c%c ", d->format.count, d->format.size,
 			 d->format.format);
@@ -1694,7 +1694,7 @@ enable_display (char *args, int from_tty
   if (p == 0)
     {
       for (d = display_chain; d; d = d->next)
-	d->status = enabled;
+	d->enabled_p = 1;
     }
   else
     while (*p)
@@ -1710,7 +1710,7 @@ enable_display (char *args, int from_tty
 	for (d = display_chain; d; d = d->next)
 	  if (d->number == num)
 	    {
-	      d->status = enabled;
+	      d->enabled_p = 1;
 	      goto win;
 	    }
 	printf_unfiltered ("No display number %d.\n", num);
@@ -1732,7 +1732,7 @@ disable_display_command (char *args, int
   if (p == 0)
     {
       for (d = display_chain; d; d = d->next)
-	d->status = disabled;
+	d->enabled_p = 0;
     }
   else
     while (*p)



  reply	other threads:[~2001-07-31  1:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.SUN.3.91.1010711161311.5321C-100000@is>
     [not found] ` <3B4E41B5.64FB@redhat.com>
2001-07-14  4:08   ` Eli Zaretskii
2001-07-16 14:52     ` Jim Blandy
2001-07-16 15:53       ` Andrew Cagney
2001-07-17  0:06       ` Eli Zaretskii
2001-07-17 10:45         ` Jim Blandy
     [not found]           ` <200107180700.KAA12466@is.elta.co.il>
2001-07-18  0:34             ` Daniel Berlin
2001-07-18 10:15             ` Jim Blandy
2001-07-18 12:59               ` Eli Zaretskii
2001-07-19  5:57         ` Michael Snyder
2001-07-19  6:13           ` Eli Zaretskii
     [not found]     ` <npzoa4y1hp.fsf@zwingli.cygnus.com>
2001-07-17  0:07       ` Eli Zaretskii
2001-07-25  7:28       ` Eli Zaretskii
2001-07-30 16:24         ` Jim Blandy
2001-07-31  1:45           ` Eli Zaretskii [this message]
2001-07-31 16:24             ` Jim Blandy
2001-07-31 16:33             ` Jim Blandy
2001-08-01  1:53               ` Eli Zaretskii
2001-08-01 14:05                 ` Andrew Cagney
2001-08-01 21:52                   ` Jim Blandy
2001-08-02  5:07                     ` Eli Zaretskii
2001-07-29  0:49     ` Eli Zaretskii

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=Pine.SUN.3.91.1010731114556.1042J-100000@is \
    --to=eliz@is.elta.co.il \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@zwingli.cygnus.com \
    --cc=msnyder@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