Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH RFA] linespec.c: fix no_symtab_msg declaration
@ 2000-11-18 20:14 Kevin Buettner
  2000-11-19  9:29 ` Jim Blandy
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Buettner @ 2000-11-18 20:14 UTC (permalink / raw)
  To: gdb-patches

The declaration of no_symtab_msg needs to be changed in order to avoid
a crasher on startup....

(top-gdb) r
Starting program: /saguaro1/sourceware-solib/bld-linux-ocotillo/gdb/gdb 
During symbol reading...inner block (0x40000000-0x40000476) not inside outer block (0x400041f0-0x400071fa)...block at 0x40000022 out of order...
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
Setting up the environment for debugging gdb.
.gdbinit:5: Error in sourced command file:
During symbol reading, 
inner block (0x4007f000-0x4007f005) not inside outer block (0x400976a0-0x40097805).
During symbol reading, block at 0x4007f063 out of order.

Program received signal SIGSEGV, Segmentation fault.
0x400c49d1 in vfprintf () at vfprintf.c:1565
Line number 1565 out of range; vfprintf.c has 21 lines.
(top-gdb) bt 8
#0  0x400c49d1 in vfprintf () at vfprintf.c:1565
#1  0x400d3581 in _IO_vasprintf (result_ptr=0xbffff488, 
    format=0x73206f4e <Address 0x73206f4e out of bounds>, args=0xbffff4e0)
    at vasprintf.c:58
#2  0x80c45f8 in vfprintf_maybe_filtered (stream=0x81e88c0, 
    format=0x73206f4e <Address 0x73206f4e out of bounds>, args=0xbffff4e0, 
    filter=1) at ../../src/gdb/utils.c:1955
#3  0x80c4662 in vfprintf_filtered (stream=0x81e88c0, 
    format=0x73206f4e <Address 0x73206f4e out of bounds>, args=0xbffff4e0)
    at ../../src/gdb/utils.c:1970
#4  0x80c3320 in verror (string=0x73206f4e <Address 0x73206f4e out of bounds>, 
    args=0xbffff4e0) at ../../src/gdb/utils.c:621
#5  0x80c3370 in error_stream (stream=0x73206f4e) at ../../src/gdb/utils.c:636
During symbol reading, Live range symbol not found 2.
#6  0x808ab56 in decode_line_1 (argptr=0xbffff63c, funfirstline=1, 
    default_symtab=0x0, default_line=0, canonical=0xbffff628)
    at ../../src/gdb/linespec.c:1262
#7  0x80d138a in parse_breakpoint_sals (address=0xbffff63c, sals=0xbffff62c, 
    addr_string=0xbffff628) at ../../src/gdb/breakpoint.c:4590
(More stack frames follow...)

The problem here is that no_symtab_msg was declared/defined as an
array in symtab.c, but declared as a pointer variable in linespec.c. 
As a result, the uses of no_symtab_msg in linespec.c were fetching the
array contents and using it as a string pointer.

It would probably be a good idea to move the extern declarations to a
header file, but since I'm not the maintainer of the files in
question, I chose to make the minimal changes needed to avoid the
crasher.

Okay to commit?

	* linespec.c (no_symtab_msg): Make declaration match definition.

Index: linespec.c
===================================================================
RCS file: /cvs/src/src/gdb/linespec.c,v
retrieving revision 1.1
diff -u -p -r1.1 linespec.c
--- linespec.c	2000/11/10 23:02:56	1.1
+++ linespec.c	2000/11/19 03:58:41
@@ -37,7 +37,7 @@ extern char *find_template_name_end (cha
 
 extern char *operator_chars (char *, char **);
 
-extern char *no_symtab_msg;
+extern char no_symtab_msg[];
 
 /* Prototypes for local functions */
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH RFA] linespec.c: fix no_symtab_msg declaration
  2000-11-18 20:14 [PATCH RFA] linespec.c: fix no_symtab_msg declaration Kevin Buettner
@ 2000-11-19  9:29 ` Jim Blandy
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Blandy @ 2000-11-19  9:29 UTC (permalink / raw)
  To: Kevin Buettner; +Cc: gdb-patches

Factoring out strings like that is ridiculous.  I've committed a
change that removes no_symtab_msg altogether, and simply writes out
the string where it is used.

Thanks for finding the problem.

There was talk a while back about teaching the linker to use debugging
info to find the types of symbols, and actually type-check the link.
Wow.  That would have caught this problem at compile-time.


Kevin Buettner <kevinb@cygnus.com> writes:

> 
> The declaration of no_symtab_msg needs to be changed in order to avoid
> a crasher on startup....
> 
> (top-gdb) r
> Starting program: /saguaro1/sourceware-solib/bld-linux-ocotillo/gdb/gdb 
> During symbol reading...inner block (0x40000000-0x40000476) not inside outer block (0x400041f0-0x400071fa)...block at 0x40000022 out of order...
> GNU gdb 5.0
> Copyright 2000 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "i686-pc-linux-gnu".
> Setting up the environment for debugging gdb.
> .gdbinit:5: Error in sourced command file:
> During symbol reading, 
> inner block (0x4007f000-0x4007f005) not inside outer block (0x400976a0-0x40097805).
> During symbol reading, block at 0x4007f063 out of order.
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x400c49d1 in vfprintf () at vfprintf.c:1565
> Line number 1565 out of range; vfprintf.c has 21 lines.
> (top-gdb) bt 8
> #0  0x400c49d1 in vfprintf () at vfprintf.c:1565
> #1  0x400d3581 in _IO_vasprintf (result_ptr=0xbffff488, 
>     format=0x73206f4e <Address 0x73206f4e out of bounds>, args=0xbffff4e0)
>     at vasprintf.c:58
> #2  0x80c45f8 in vfprintf_maybe_filtered (stream=0x81e88c0, 
>     format=0x73206f4e <Address 0x73206f4e out of bounds>, args=0xbffff4e0, 
>     filter=1) at ../../src/gdb/utils.c:1955
> #3  0x80c4662 in vfprintf_filtered (stream=0x81e88c0, 
>     format=0x73206f4e <Address 0x73206f4e out of bounds>, args=0xbffff4e0)
>     at ../../src/gdb/utils.c:1970
> #4  0x80c3320 in verror (string=0x73206f4e <Address 0x73206f4e out of bounds>, 
>     args=0xbffff4e0) at ../../src/gdb/utils.c:621
> #5  0x80c3370 in error_stream (stream=0x73206f4e) at ../../src/gdb/utils.c:636
> During symbol reading, Live range symbol not found 2.
> #6  0x808ab56 in decode_line_1 (argptr=0xbffff63c, funfirstline=1, 
>     default_symtab=0x0, default_line=0, canonical=0xbffff628)
>     at ../../src/gdb/linespec.c:1262
> #7  0x80d138a in parse_breakpoint_sals (address=0xbffff63c, sals=0xbffff62c, 
>     addr_string=0xbffff628) at ../../src/gdb/breakpoint.c:4590
> (More stack frames follow...)
> 
> The problem here is that no_symtab_msg was declared/defined as an
> array in symtab.c, but declared as a pointer variable in linespec.c. 
> As a result, the uses of no_symtab_msg in linespec.c were fetching the
> array contents and using it as a string pointer.
> 
> It would probably be a good idea to move the extern declarations to a
> header file, but since I'm not the maintainer of the files in
> question, I chose to make the minimal changes needed to avoid the
> crasher.
> 
> Okay to commit?
> 
> 	* linespec.c (no_symtab_msg): Make declaration match definition.
> 
> Index: linespec.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linespec.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 linespec.c
> --- linespec.c	2000/11/10 23:02:56	1.1
> +++ linespec.c	2000/11/19 03:58:41
> @@ -37,7 +37,7 @@ extern char *find_template_name_end (cha
>  
>  extern char *operator_chars (char *, char **);
>  
> -extern char *no_symtab_msg;
> +extern char no_symtab_msg[];
>  
>  /* Prototypes for local functions */
>  
> 
> 
From bje@redhat.com Sun Nov 19 14:30:00 2000
From: Ben Elliston <bje@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [Sim] New primitives for sim/common/cgen-ops.h
Date: Sun, 19 Nov 2000 14:30:00 -0000
Message-id: <200011192229.eAJMTqB11690@scooby.cygnus.com>
X-SW-Source: 2000-11/msg00248.html
Content-length: 2575

FYI, I have just committed the following patch to the repository.

Cheers, Ben


2000-11-20  Ben Elliston  <bje@redhat.com>

	* cgen-ops.h (SUBBI): New macro.
	(SUBWORDSIQI, SUBWORDSIHI, SUBWORDSIUQI): New functions.
	(SUBWORDDIHI, SUBWORDDIUQI, SUBWORDDIDF): Likewise.

*** cgen-ops.h	2000/06/06 04:06:55	1.16
--- cgen-ops.h	2000/11/19 22:26:42
***************
*** 23,28 ****
--- 23,30 ----
  #ifndef CGEN_SEM_OPS_H
  #define CGEN_SEM_OPS_H
  
+ #include <assert.h>
+ 
  #if defined (__GNUC__) && ! defined (SEMOPS_DEFINE_INLINE)
  #define SEMOPS_DEFINE_INLINE
  #define SEMOPS_INLINE extern inline
***************
*** 39,44 ****
--- 41,47 ----
  #define ANDIF(x, y) ((x) && (y))
  #define ORIF(x, y) ((x) || (y))
  
+ #define SUBBI(x, y) ((x) - (y))
  #define ANDBI(x, y) ((x) & (y))
  #define ORBI(x, y) ((x) | (y))
  #define XORBI(x, y) ((x) ^ (y))
***************
*** 308,313 ****
--- 311,354 ----
    return x.out;
  }
  
+ SEMOPS_INLINE DF
+ SUBWORDDIDF (DI in)
+ {
+   union { DI in; DF out; } x;
+   x.in = in;
+   return x.out;
+ }
+ 
+ SEMOPS_INLINE QI
+ SUBWORDSIQI (SI in, int byte)
+ {
+   assert (byte >= 0 && byte <= 3);
+   return (UQI) (in >> (8 * (3 - byte)));
+ }
+ 
+ SEMOPS_INLINE UQI
+ SUBWORDSIUQI (SI in, int byte)
+ {
+   assert (byte >= 0 && byte <= 3);
+   return (UQI) (in >> (8 * (3 - byte)));
+ }
+ 
+ SEMOPS_INLINE HI
+ SUBWORDDIHI (DI in, int word)
+ {
+   assert (word >= 0 && word <= 3);
+   return (UHI) (in >> (16 * (3 - word)));
+ }
+ 
+ SEMOPS_INLINE HI
+ SUBWORDSIHI (SI in, int word)
+ {
+   if (word == 0)
+     return (USI) in >> 16;
+   else
+     return in;
+ }
+ 
  SEMOPS_INLINE SI
  SUBWORDSFSI (SF in)
  {
***************
*** 316,321 ****
--- 357,369 ----
    return x.out;
  }
  
+ SEMOPS_INLINE UQI
+ SUBWORDDIUQI (DI in, int byte)
+ {
+   assert (byte >= 0 && byte <= 7);
+   return (UQI) (in >> (8 * (7 - byte)));
+ }
+ 
  SEMOPS_INLINE SI
  SUBWORDDISI (DI in, int word)
  {
***************
*** 397,408 ****
  
  #else
  
! SF SUBWORDSISF (SI);
  SI SUBWORDSFSI (SF);
  SI SUBWORDDISI (DI, int);
  SI SUBWORDDFSI (DF, int);
  SI SUBWORDXFSI (XF, int);
  SI SUBWORDTFSI (TF, int);
  
  DI JOINSIDI (SI, SI);
  DF JOINSIDF (SI, SI);
--- 445,463 ----
  
  #else
  
! QI SUBWORDSIQI (SI);
! HI SUBWORDSIHI (HI);
  SI SUBWORDSFSI (SF);
+ SF SUBWORDSISF (SI);
+ DF SUBWORDDIDF (DI);
+ HI SUBWORDDIHI (DI, int);
  SI SUBWORDDISI (DI, int);
  SI SUBWORDDFSI (DF, int);
  SI SUBWORDXFSI (XF, int);
  SI SUBWORDTFSI (TF, int);
+ 
+ UQI SUBWORDSIUQI (SI);
+ UQI SUBWORDDIUQI (DI);
  
  DI JOINSIDI (SI, SI);
  DF JOINSIDF (SI, SI);
From ac131313@cygnus.com Sun Nov 19 16:46:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Alexandre Oliva <aoliva@redhat.com>
Cc: binutils@sources.redhat.com, gdb-patches@sources.redhat.com, newlib@sources.redhat.com
Subject: Re: Merge of top-level Makefile.in
Date: Sun, 19 Nov 2000 16:46:00 -0000
Message-id: <3A18729A.BA4D72FF@cygnus.com>
References: <ork8a13pqb.fsf@guarana.lsd.ic.unicamp.br>
X-SW-Source: 2000-11/msg00249.html
Content-length: 1018

Alexandre Oliva wrote:
> 
> I've just merged the top-level Makefile.in with that of the GCC
> repository, as well as libgcj's.  Now they're identical.  Please help
> keep them from diverging again.  Thanks,
> 
>   ------------------------------------------------------------------------
> Index: ChangeLog
> from  Alexandre Oliva  <aoliva@redhat.com>
> 
>         * Makefile.in: Merge with GCC and libgcj.
>         (ALL_GCC_C, ALL_GCC_CXX): New macros.  Use them as dependencies of
>         configure-target-<library> when their configure scripts need the C
>         or C++ library to have already been built to work properly.
>         (do_proto_toplev): Set them to an empty string.

What is now going to be considered the master?  Like a few of the other
top-level files, I suspect one of the N Makefile.ins should be
designated as the master so that all changes get routed through it.

Off hand, I suspect the GDB+BINUTILS+DEJAGN+... version would be best. 
Only because it contains the most tools :-)

	Andrew
From aoliva@redhat.com Sun Nov 19 16:58:00 2000
From: Alexandre Oliva <aoliva@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: binutils@sources.redhat.com, gdb-patches@sources.redhat.com, newlib@sources.redhat.com
Subject: Re: Merge of top-level Makefile.in
Date: Sun, 19 Nov 2000 16:58:00 -0000
Message-id: <orr9478nnq.fsf@guarana.lsd.ic.unicamp.br>
References: <ork8a13pqb.fsf@guarana.lsd.ic.unicamp.br> <3A18729A.BA4D72FF@cygnus.com>
X-SW-Source: 2000-11/msg00250.html
Content-length: 932

On Nov 19, 2000, Andrew Cagney <ac131313@cygnus.com> wrote:

> What is now going to be considered the master?

IMO, we should make sure we keep them all in sync, so that, whenever
we merge the repos (if we ever get to that), it'll just be a matter of
comparing the files and noting they're identical.

> Off hand, I suspect the GDB+BINUTILS+DEJAGN+... version would be
> best. Only because it contains the most tools :-)

Sounds reasonable to me.

Maybe we should create a new mailing list to which all top-level
changes should be posted.  I always feel like I'm missing a dozen
patches mailing-lists when I make a change to a top-level file.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me
From ac131313@cygnus.com Sun Nov 19 17:02:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: ``extern'' in C files; Was: [PATCH RFA] linespec.c: fix no_symtab_msg declaration
Date: Sun, 19 Nov 2000 17:02:00 -0000
Message-id: <3A187632.E15748E8@cygnus.com>
References: <1001119041439.ZM7079@ocotillo.lan>
X-SW-Source: 2000-11/msg00251.html
Content-length: 799

> Index: linespec.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/linespec.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 linespec.c
> --- linespec.c  2000/11/10 23:02:56     1.1
> +++ linespec.c  2000/11/19 03:58:41
> @@ -37,7 +37,7 @@ extern char *find_template_name_end (cha
> 
>  extern char *operator_chars (char *, char **);
> 
> -extern char *no_symtab_msg;
> +extern char no_symtab_msg[];
> 
>  /* Prototypes for local functions */
> 

A generalization as shoving ``extern'' declarations into C files has,
unfortunately, been a common practice :-(

``extern'' declarations in a C files are bad, M'kay :-)  The way to fix
it is to move the declaration to a header file (or simply eliminate the
problem, as Jim did :-).

	enjoy,
		Andrew
From ac131313@cygnus.com Sun Nov 19 17:16:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: Steven Johnson <sbjohnson@ozemail.com.au>
Cc: gdb-patches@sources.redhat.com, Michael Snyder <msnyder@redhat.com>
Subject: Re: Regcache.h grows up (with help from Andrew)
Date: Sun, 19 Nov 2000 17:16:00 -0000
Message-id: <3A18796D.4333562F@cygnus.com>
References: <39F8273E.D5B48CFB@ozemail.com.au>
X-SW-Source: 2000-11/msg00252.html
Content-length: 754

Steven Johnson wrote:
> 
> Based on Andrews comments, here is a minor revision of the regcache.h
> patch.
> 
> Changelog entry modified.
> Copyright notice adjusted.
> enum for register cache validity flags created.
> defs.h no longer included.
> 
> PS. Andrew/Michael, If by any chance this doesn't make it to the list
> can you please forward it for me. Thanks.
> 
> Steven.
> 
> 2000-09-12  Steven Johnson  <sbjohnson@ozemail.com.au>
> 
>          * regcache.h : Creation of a new header to partner regcache.c,
> collates
>          definitions that used to be scattered throughout GDB.
> 

This cleanup is approved.

Steve, the ChangeLog will still need to list every file you touch - all
the ones that now include "regcache.h".

and thanks!
	Andrew
From ac131313@cygnus.com Sun Nov 19 17:56:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [patch] TODO more cleanups
Date: Sun, 19 Nov 2000 17:56:00 -0000
Message-id: <3A1882DA.5BB83CCF@cygnus.com>
X-SW-Source: 2000-11/msg00253.html
Content-length: 1197

FYI,

I've added the following to the list of general cleanups.

To expand a little on the comment attatched to STREQ().  The intention
is that the person rewriting the STREQ() calls does more than hope that
the changes work.  For instance, as part of a first pass, you could hack
STREQ() to record the file/line of all calls made as part of the
testsuite run.  Just those cases would then be modified.

enjoy,
	Andrew
Mon Nov 20 12:22:32 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* TODO: Mention ``extern'' and ``STREQ'' cleanups.

Index: TODO
===================================================================
RCS file: /cvs/src/src/gdb/TODO,v
retrieving revision 1.52
diff -p -r1.52 TODO
*** TODO	2000/11/03 22:00:56	1.52
--- TODO	2000/11/20 01:42:48
*************** remote_remove_watchpoint, remote_insert_
*** 519,524 ****
--- 519,536 ----
  
  --
  
+ Eliminate ``extern'' from C files.
+ 
+ --
+ 
+ Replace ``STREQ()'' et.al. with ``strcmp() == 0'' et.al.
+ 
+ Extreme care is recommeded - perhaps only modify tests that are
+ exercised by the testsuite (as determined using some type of code
+ coverage analysis).
+ 
+ --
+ 
  			New Features and Fixes
  			======================
  
From ac131313@cygnus.com Sun Nov 19 18:08:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: Re: [rfc] asprintf() -> xasprintf()
Date: Sun, 19 Nov 2000 18:08:00 -0000
Message-id: <3A1885A8.9A4F393D@cygnus.com>
References: <3A0F81A1.DB7C9B1E@cygnus.com>
X-SW-Source: 2000-11/msg00254.html
Content-length: 619

FYI,

I've checked this in.

	Andrew

Fri Nov 17 16:07:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>

     * utils.c (xvasprintf, xasprintf): New functions.
     * defs.h (xvasprintf, xasprintf): Add declarations.

     * remote.c (add_packet_config_cmd): Use function xasprintf instead
     of asprintf.
     * utils.c (vfprintf_maybe_filtered, vfprintf_unfiltered): Use
     function xvasprintf instead of vasprintf.

     * TODO (xasprintf): Update.

Fri Nov 17 16:07:23 2000  Andrew Cagney  <cagney@b1.cygnus.com>

     * mi-main.c: Replace asprintf with xasprintf.
     * mi-cmd-var.c (mi_cmd_var_create): Ditto.
From ac131313@cygnus.com Sun Nov 19 19:36:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [patch] Mark error_no_arg() as a no-return function
Date: Sun, 19 Nov 2000 19:36:00 -0000
Message-id: <3A189A0E.AB82D4C0@cygnus.com>
X-SW-Source: 2000-11/msg00255.html
Content-length: 903

FYI,

I've checked in the attatched.  The function calls error() and error()
doesn't return.

	Andrew
Mon Nov 20 14:29:39 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* command.h (error_no_arg): Add noreturn attribute to declaration.

Index: command.h
===================================================================
RCS file: /cvs/src/src/gdb/command.h,v
retrieving revision 1.13
diff -p -r1.13 command.h
*** command.h	2000/11/06 22:44:34	1.13
--- command.h	2000/11/20 03:32:17
*************** extern void do_setshow_command (char *, 
*** 347,353 ****
  
  extern void cmd_show_list (struct cmd_list_element *, int, char *);
  
! extern void error_no_arg (char *);
  
  extern void dont_repeat (void);
  
--- 347,353 ----
  
  extern void cmd_show_list (struct cmd_list_element *, int, char *);
  
! extern NORETURN void error_no_arg (char *) ATTR_NORETURN;
  
  extern void dont_repeat (void);
  
From orjan.friberg@axis.com Mon Nov 20 01:17:00 2000
From: Orjan Friberg <orjan.friberg@axis.com>
To: Andrew Cagney <ac131313@cygnus.com>, Michael Snyder <msnyder@redhat.com>, Fernando Nasser <fnasser@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: Relying on tm-target.h macros in target-tdep.c
Date: Mon, 20 Nov 2000 01:17:00 -0000
Message-id: <3A18EC08.12BF7D2F@axis.com>
References: <3A13C9E5.D5465E2C@axis.com> <3A13E1F7.8CCB0A4C@cygnus.com> <3A13FD96.639B2F6@axis.com> <3A1436FD.581FDFDB@redhat.com> <3A14B5BB.CD277E65@cygnus.com>
X-SW-Source: 2000-11/msg00256.html
Content-length: 564

Andrew, Michael, Fernando,

Thanks for your input and advice on the architectural issues -- I've
read- and re-read them. If my current solution is approved of by my
peers, I will submit it shortly. If the discussion needs to be
continued, I assume you will need the whole context anyway. I haven't
sorted out all the multi-arch framework related questions yet, partly
due to the fact that the newer chip hasn't been available to me.

Again, thanks.

-- 
Orjan Friberg              E-mail: orjan.friberg@axis.com
Axis Communications AB     Phone:  +46 46 272 17 68
From ac131313@cygnus.com Mon Nov 20 03:56:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [rfa/rfc] Add --enable-gdb-build-warnings, update doco
Date: Mon, 20 Nov 2000 03:56:00 -0000
Message-id: <3A190F4D.832E2F4B@cygnus.com>
X-SW-Source: 2000-11/msg00257.html
Content-length: 4066

Hello,

The --enable-gdb-build-warnings configuration option permits finer
grained (gdb directory only) control over the build warnings list. 
Useful when building with -Werror.

Eli,
Note the doco change.  Ok?

	Andrew
Index: ChangeLog
Mon Nov 20 13:59:29 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* configure.in: Add support for configure option
 	--enable-gdb-build-warnings. Mention need to update doco.
	* configure: Regenerate.

Index: doc/ChangeLog
Mon Nov 20 21:29:35 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* gdbint.texinfo (Coding): Update current value of
 	--enable-build-warnings.  Mention --enable-gdb-build-warnings.

Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.15
diff -p -r1.15 gdbint.texinfo
*** gdbint.texinfo	2000/08/10 13:42:29	1.15
--- gdbint.texinfo	2000/11/20 11:10:36
*************** does not require it, @value{GDBN} requir
*** 2773,2783 ****
  @value{GDBN} follows an additional set of coding standards specific to @value{GDBN},
  as described in the following sections.
  
! You can configure with @samp{--enable-build-warnings} to get GCC to
! check on a number of these rules.  @value{GDBN} sources ought not to engender any
! complaints, unless they are caused by bogus host systems.  (The exact
! set of enabled warnings is currently @samp{-Wall -Wpointer-arith
! -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations}.
  
  @subsection Formatting
  
--- 2773,2784 ----
  @value{GDBN} follows an additional set of coding standards specific to @value{GDBN},
  as described in the following sections.
  
! You can configure with @samp{--enable-build-warnings} or
! @samp{--enable-gdb-build-warnings} to get GCC to check on a number of
! these rules.  @value{GDBN} sources ought not to engender any complaints,
! unless they are caused by bogus host systems.  (The exact set of enabled
! warnings is currently @samp{-Wimplicit -Wreturn-type -Wcomment
! -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith -Wuninitialized}.
  
  @subsection Formatting
  
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.44
diff -p -r1.44 configure.in
*** configure.in	2000/09/11 17:57:07	1.44
--- configure.in	2000/11/20 10:54:10
*************** if test "${enable_netrom}" = "yes"; then
*** 531,538 ****
  fi
  
  
! # Don't add -Wall or -Wunused, they include -Wunused-parameter which
! # causes noise.
  build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
  -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
  # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
--- 531,540 ----
  fi
  
  
! # NOTE: Don't add -Wall or -Wunused, they both include
! # -Wunused-parameter which reports bogus warnings.
! # NOTE: If you add to this list, remember to update
! # gdb/doc/gdbint.texinfo.
  build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
  -Wformat -Wparentheses -Wpointer-arith -Wuninitialized"
  # Up for debate: -Wswitch -Wcomment -trigraphs -Wtrigraphs
*************** AC_ARG_ENABLE(build-warnings,
*** 554,559 ****
--- 556,575 ----
  esac
  if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
    echo "Setting compiler warning flags = $build_warnings" 6>&1
+ fi])dnl
+ AC_ARG_ENABLE(gdb-build-warnings,
+ [  --enable-gdb-build-warnings Enable GDB specific build-time compiler warnings if gcc is used],
+ [case "${enableval}" in
+   yes)	;;
+   no)	build_warnings="-w";;
+   ,*)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+         build_warnings="${build_warnings} ${t}";;
+   *,)   t=`echo "${enableval}" | sed -e "s/,/ /g"`
+         build_warnings="${t} ${build_warnings}";;
+   *)    build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
+ esac
+ if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
+   echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
  fi])dnl
  WARN_CFLAGS=""
  WERROR_CFLAGS=""
From ac131313@cygnus.com Mon Nov 20 04:29:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [maint] AIX and Shared libraries
Date: Mon, 20 Nov 2000 04:29:00 -0000
Message-id: <3A19171D.A0BB081A@cygnus.com>
X-SW-Source: 2000-11/msg00258.html
Content-length: 1273

FYI,

This better reflects who really is doing what where in these two areas.

AIX                   Peter Schauer          
Peter.Schauer@regent.e-technik.tu-muenchen.de
                      Kevin Buettner          kevinb@cygnus.com

shared libs (devolved)        Jim Blandy              jimb@cygnus.com
                      Kevin Buettner          kevinb@cygnus.com
  xcoffsolib          Peter Schauer          
Peter.Schauer@regent.e-technik.tu-muenchen.de


	Andrew
Mon Nov 20 14:29:39 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* command.h (error_no_arg): Add noreturn attribute to declaration.

Index: command.h
===================================================================
RCS file: /cvs/src/src/gdb/command.h,v
retrieving revision 1.13
diff -p -r1.13 command.h
*** command.h	2000/11/06 22:44:34	1.13
--- command.h	2000/11/20 03:32:17
*************** extern void do_setshow_command (char *, 
*** 347,353 ****
  
  extern void cmd_show_list (struct cmd_list_element *, int, char *);
  
! extern void error_no_arg (char *);
  
  extern void dont_repeat (void);
  
--- 347,353 ----
  
  extern void cmd_show_list (struct cmd_list_element *, int, char *);
  
! extern NORETURN void error_no_arg (char *) ATTR_NORETURN;
  
  extern void dont_repeat (void);
  
From ac131313@cygnus.com Mon Nov 20 04:41:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [maint] Clarify Solaris/x86 maint
Date: Mon, 20 Nov 2000 04:41:00 -0000
Message-id: <3A1919F7.7FE740F4@cygnus.com>
X-SW-Source: 2000-11/msg00259.html
Content-length: 1179

FYI,

I've checked in the attatched (as requested by Nick).

	Andrew
Mon Nov 20 23:21:53 2000  Andrew Cagney  <cagney@b1.cygnus.com>
  
	From Nick Duffek:
 	* MAINTAINERS: Share responsibility for
 	Solaris/x86 between co-maintainers.

Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.55
diff -p -r1.55 MAINTAINERS
*** MAINTAINERS	2000/11/20 12:31:43	1.55
--- MAINTAINERS	2000/11/20 12:36:06
*************** NetBSD native & host	J.T. Conklin		jtc@r
*** 134,140 ****
  SCO/Unixware		Nick Duffek		nsd@cygnus.com
  			Robert Lipe		rjl@sco.com
  GNU/Linux ARM native	Scott Bambrough		scottb@netwinder.org
! Solaris/x86 native & host
  			Nick Duffek		nsd@cygnus.com
  			Peter Schauer		Peter.Schauer@regent.e-technik.tu-muenchen.de
  Solaris/SPARC native & host
--- 134,140 ----
  SCO/Unixware		Nick Duffek		nsd@cygnus.com
  			Robert Lipe		rjl@sco.com
  GNU/Linux ARM native	Scott Bambrough		scottb@netwinder.org
! Solaris/x86 native & host (devolved)
  			Nick Duffek		nsd@cygnus.com
  			Peter Schauer		Peter.Schauer@regent.e-technik.tu-muenchen.de
  Solaris/SPARC native & host
From ac131313@cygnus.com Mon Nov 20 05:12:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: [maint] Add linespec as a separate component
Date: Mon, 20 Nov 2000 05:12:00 -0000
Message-id: <3A192122.3B199D5E@cygnus.com>
X-SW-Source: 2000-11/msg00260.html
Content-length: 1346

FYI,

Per discussion with Jim, Elena and Fernando.

	Andrew
Mon Nov 20 23:21:53 2000  Andrew Cagney  <cagney@b1.cygnus.com>

	* MAINTAINERS: Add linespec as a separate component.
	
Index: MAINTAINERS
===================================================================
RCS file: /cvs/src/src/gdb/MAINTAINERS,v
retrieving revision 1.56
diff -p -r1.56 MAINTAINERS
*** MAINTAINERS	2000/11/20 12:45:01	1.56
--- MAINTAINERS	2000/11/20 13:03:18
*************** generic arch support	Andrew Cagney		cagn
*** 152,157 ****
--- 152,158 ----
  target vector		Andrew Cagney		cagney@cygnus.com
  main (main.c, top.c)	Elena Zannoni		ezannoni@cygnus.com
  event loop		Elena Zannoni           ezannoni@cygnus.com
+ 
  generic symtabs		Jim Blandy		jimb@cygnus.com
  			Elena Zannoni		ezannoni@cygnus.com
    dwarf readers		Jim Blandy		jimb@cygnus.com
*************** generic symtabs		Jim Blandy		jimb@cygnus
*** 161,166 ****
--- 162,171 ----
    stabs reader		Jim Blandy		jimb@cygnus.com
  			Elena Zannoni		ezannoni@cygnus.com
    coff reader		Philippe De Muyter	phdm@macqel.be
+   linespec		Jim Blandy		jimb@cygnus.com
+ 			Elena Zannoni		ezannoni@cygnus.com
+ 			Fernando Nasser		fnasser@cygnus.com
+ 
  tracing bytecode stuff  Jim Blandy              jimb@cygnus.com
  tracing			Michael Snyder		msnyder@cygnus.com
  threads			Michael Snyder		msnyder@cygnus.com
From ac131313@cygnus.com Mon Nov 20 08:14:00 2000
From: Andrew Cagney <ac131313@cygnus.com>
To: "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [RFA] target.*:  Handle SIGRTMAX for IRIX 6.
Date: Mon, 20 Nov 2000 08:14:00 -0000
Message-id: <3A194C03.97D3D120@cygnus.com>
References: <200010021400.QAA02164@reisser.regent.e-technik.tu-muenchen.de>
X-SW-Source: 2000-11/msg00261.html
Content-length: 2129

This change is approved.

	Andrew


To : gdb-patches at sourceware dot cygnus dot com
Subject : [RFA] target.*:  Handle SIGRTMAX for IRIX 6.
From : "Peter.Schauer" <Peter dot Schauer at regent dot e-technik dot tu-muenchen dot de>
Date : Mon, 2 Oct 2000 16:00:11 MET DST

Oh well.
Unfortunately IRIX 6 has a SIGRTMAX with signal number 64.
The following kludge lets GDB handle this signal as well.

I am not sure if we shouldn't reserve a new contiguous block of realtime
signals for future targets though.

	* target.h (TARGET_SIGNAL_REALTIME_64):  Added for IRIX 6.
	* target.c (target_signal_from_host, do_target_signal_to_host):
	Handle TARGET_SIGNAL_REALTIME_64.

*** ./target.c.orig	Fri Sep 29 14:54:01 2000
--- ./target.c	Fri Sep 29 17:53:35 2000
***************
*** 1423,1428 ****
--- 1423,1429 ----
    {"SIG63", "Real-time event 63"},
    {"SIGCANCEL", "LWP internal signal"},
    {"SIG32", "Real-time event 32"},
+   {"SIG64", "Real-time event 64"},
  
  #if defined(MACH) || defined(__MACH__)
    /* Mach exceptions */
***************
*** 1737,1742 ****
--- 1738,1745 ----
        if (33 <= hostsig && hostsig <= 63)
  	return (enum target_signal)
  	  (hostsig - 33 + (int) TARGET_SIGNAL_REALTIME_33);
+       else if (hostsig == 64)
+ 	return TARGET_SIGNAL_REALTIME_64;
        else
  	error ("GDB bug: target.c (target_signal_from_host): unrecognized real-time signal");
      }
***************
*** 2008,2013 ****
--- 2011,2018 ----
  	  if (retsig >= SIGRTMIN && retsig <= SIGRTMAX)
  	    return retsig;
  	}
+       else if (oursig == TARGET_SIGNAL_REALTIME_64)
+ 	return 64;
  #endif
        *oursig_ok = 0;
        return 0;
*** ./target.h.orig	Fri Sep 29 14:54:01 2000
--- ./target.h	Mon Oct  2 15:50:57 2000
***************
*** 239,244 ****
--- 239,246 ----
         of the protocol.  Note that in some GDB's TARGET_SIGNAL_REALTIME_32
         is number 76.  */
      TARGET_SIGNAL_REALTIME_32,
+     /* Yet another pain, IRIX 6 has SIG64.  */
+     TARGET_SIGNAL_REALTIME_64,
  
  #if defined(MACH) || defined(__MACH__)
      /* Mach exceptions */

-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-11-19  9:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-18 20:14 [PATCH RFA] linespec.c: fix no_symtab_msg declaration Kevin Buettner
2000-11-19  9:29 ` Jim Blandy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox