Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: jtc@redback.com (J.T. Conklin)
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 10:50:00 -0000	[thread overview]
Message-ID: <5mk8cdzgri.fsf@jtc.redback.com> (raw)
In-Reply-To: <1000915073306.ZM4195@ocotillo.lan>

>>>>> "Kevin" == Kevin Buettner <kevinb@cygnus.com> writes:
Kevin> I did three files this time because there was only one function that
Kevin> needed doing in each of them.  (The m88k-*.c files bring back old
Kevin> memories; I first started hacking on gdb on an m88k box in the early
Kevin> nineties.)
Kevin>
Kevin> 	* m32r-stub.c (prepare_to_step): Protoize.

Should we consider not protoizing the *-stub.c files?  While these are
distributed with GDB, they are code that is going to be hacked to bits
as they are integrated into a remote target.  While user is probably
using gcc, it may be reasonable to be as conservative we can when it 
comes to these files...

        --jtc

-- 
J.T. Conklin
RedBack Networks
From shebs@apple.com Fri Sep 15 11:04:00 2000
From: Stan Shebs <shebs@apple.com>
To: jtc@redback.com
Cc: Kevin Buettner <kevinb@cygnus.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 11:04:00 -0000
Message-id: <39C2649F.36BE8BBD@apple.com>
References: <1000915073306.ZM4195@ocotillo.lan> <5mk8cdzgri.fsf@jtc.redback.com>
X-SW-Source: 2000-09/msg00139.html
Content-length: 1136

"J.T. Conklin" wrote:
> 
> >>>>> "Kevin" == Kevin Buettner <kevinb@cygnus.com> writes:
> Kevin> I did three files this time because there was only one function that
> Kevin> needed doing in each of them.  (The m88k-*.c files bring back old
> Kevin> memories; I first started hacking on gdb on an m88k box in the early
> Kevin> nineties.)
> Kevin>
> Kevin>  * m32r-stub.c (prepare_to_step): Protoize.
> 
> Should we consider not protoizing the *-stub.c files?  While these are
> distributed with GDB, they are code that is going to be hacked to bits
> as they are integrated into a remote target.  While user is probably
> using gcc, it may be reasonable to be as conservative we can when it
> comes to these files...

It's a pretty safe bet that all m32r compilers are ISO!  I thought
about the stub code standard a while back, and concluded that since
the stubs are effectively example code, they at least ought to be
*good* examples.  In fact, they're probably the most-looked-at sources
in the whole GDB tree, so they should be exemplars of our recommended
coding practices (suitably adjusted for the embedded case of course).

Stan
From kevinb@cygnus.com Fri Sep 15 11:13:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 11:13:00 -0000
Message-id: <1000915181249.ZM5172@ocotillo.lan>
References: <1000915073306.ZM4195@ocotillo.lan> <5mk8cdzgri.fsf@jtc.redback.com>
X-SW-Source: 2000-09/msg00140.html
Content-length: 1299

On Sep 15, 10:50am, J.T. Conklin wrote:

> >>>>> "Kevin" == Kevin Buettner <kevinb@cygnus.com> writes:
> Kevin> I did three files this time because there was only one function that
> Kevin> needed doing in each of them.  (The m88k-*.c files bring back old
> Kevin> memories; I first started hacking on gdb on an m88k box in the early
> Kevin> nineties.)
> Kevin>
> Kevin> 	* m32r-stub.c (prepare_to_step): Protoize.
> 
> Should we consider not protoizing the *-stub.c files?  While these are
> distributed with GDB, they are code that is going to be hacked to bits
> as they are integrated into a remote target.  While user is probably
> using gcc, it may be reasonable to be as conservative we can when it 
> comes to these files...

You're right.  I think that Andrew (and perhaps others) warned me about
this too.

I hereby withdraw the m32r-stub.c portion of the patch.

Also, I will need to revert many of the changes that occurred in my
changes of 2000-07-29.  Specifically, I'll need to revert the changes
that were made to the following files:

    i386-stub.c
    m32r-stub.c
    m68k-stub.c
    sh-stub.c
    sparc-stub.c
    sparcl-stub.c
    sparclet-stub.c

I'll post a separate RFC for the reversion changes and wait a few days
for comments as usual.

Thanks for catching this.

Kevin
From kevinb@cygnus.com Fri Sep 15 11:18:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: Stan Shebs <shebs@apple.com>, jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 11:18:00 -0000
Message-id: <1000915181800.ZM5181@ocotillo.lan>
References: <1000915073306.ZM4195@ocotillo.lan> <5mk8cdzgri.fsf@jtc.redback.com> <39C2649F.36BE8BBD@apple.com> <shebs@apple.com>
X-SW-Source: 2000-09/msg00141.html
Content-length: 895

On Sep 15, 11:04am, Stan Shebs wrote:

> "J.T. Conklin" wrote:
>
> > Should we consider not protoizing the *-stub.c files?  While these are
> > distributed with GDB, they are code that is going to be hacked to bits
> > as they are integrated into a remote target.  While user is probably
> > using gcc, it may be reasonable to be as conservative we can when it
> > comes to these files...
> 
> It's a pretty safe bet that all m32r compilers are ISO!  I thought
> about the stub code standard a while back, and concluded that since
> the stubs are effectively example code, they at least ought to be
> *good* examples.  In fact, they're probably the most-looked-at sources
> in the whole GDB tree, so they should be exemplars of our recommended
> coding practices (suitably adjusted for the embedded case of course).

Okay, I'm confused.  Stan, are you suggesting that I leave the
prototypes in?
From jtc@redback.com Fri Sep 15 11:32:00 2000
From: jtc@redback.com (J.T. Conklin)
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 11:32:00 -0000
Message-id: <5mwvgdy09h.fsf@jtc.redback.com>
References: <1000915073306.ZM4195@ocotillo.lan> <5mk8cdzgri.fsf@jtc.redback.com> <1000915181249.ZM5172@ocotillo.lan>
X-SW-Source: 2000-09/msg00142.html
Content-length: 1655

>>>>> "Kevin" == Kevin Buettner <kevinb@cygnus.com> writes:
>> Should we consider not protoizing the *-stub.c files?  While these are
>> distributed with GDB, they are code that is going to be hacked to bits
>> as they are integrated into a remote target.  While user is probably
>> using gcc, it may be reasonable to be as conservative we can when it 
>> comes to these files...

Kevin> You're right.  I think that Andrew (and perhaps others) warned
Kevin> me about this too.

Kevin> I hereby withdraw the m32r-stub.c portion of the patch.

Kevin> Also, I will need to revert many of the changes that occurred in my
Kevin> changes of 2000-07-29.  Specifically, I'll need to revert the changes
Kevin> that were made to the following files:

Kevin>     i386-stub.c
Kevin>     m32r-stub.c
Kevin>     m68k-stub.c
Kevin>     sh-stub.c
Kevin>     sparc-stub.c
Kevin>     sparcl-stub.c
Kevin>     sparclet-stub.c

And I should have cought this and commented then.  Sorry 'bout that.  
I've been overwhelmed as of late.

Kevin> I'll post a separate RFC for the reversion changes and wait a few days
Kevin> for comments as usual.

Don't jump the gun.  As Stan says, there are reasons that we might
want to protoize the files.  Lets make sure the pros and cons of stub
protoization are understood, and then make a decision whether to keep
the work you already have completed or to revert it.

I'm pretty ambivilent about it myself.  In my experience, beyond toy
programs, stubs get hacked quite extensively to integrate them into
the target system.  Removing protototypes would be the least of the
user's worries.

        --jtc

-- 
J.T. Conklin
RedBack Networks
From shebs@apple.com Fri Sep 15 11:50:00 2000
From: Stan Shebs <shebs@apple.com>
To: jtc@redback.com
Cc: Kevin Buettner <kevinb@cygnus.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 11:50:00 -0000
Message-id: <39C26F82.288A4D27@apple.com>
References: <1000915073306.ZM4195@ocotillo.lan> <5mk8cdzgri.fsf@jtc.redback.com> <1000915181249.ZM5172@ocotillo.lan> <5mwvgdy09h.fsf@jtc.redback.com>
X-SW-Source: 2000-09/msg00144.html
Content-length: 647

"J.T. Conklin" wrote:
> 
> I'm pretty ambivilent about it myself.  In my experience, beyond toy
> programs, stubs get hacked quite extensively to integrate them into
> the target system.  Removing protototypes would be the least of the
> user's worries.

So can you imagine any possible circumstance in which having a
prototyped and/or ISO stub would be a problem for an actual
embedded system developer today?  The only example I can synthesize
involves somebody that can only use GDB with one of Sun's old compilers
adapted for embedded use, but not GCC.  That's pretty farfetched though,
and I've never heard of an actual case like that.

Stan
From kevinb@cygnus.com Fri Sep 15 11:50:00 2000
From: Kevin Buettner <kevinb@cygnus.com>
To: jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH RFC] Protoize m32r-stub.c, m88k-nat.c, m88k-tdep.c
Date: Fri, 15 Sep 2000 11:50:00 -0000
Message-id: <1000915185022.ZM5331@ocotillo.lan>
References: <1000915073306.ZM4195@ocotillo.lan> <5mk8cdzgri.fsf@jtc.redback.com> <1000915181249.ZM5172@ocotillo.lan> <5mwvgdy09h.fsf@jtc.redback.com>
X-SW-Source: 2000-09/msg00143.html
Content-length: 17953

On Sep 15, 11:32am, J.T. Conklin wrote:

> Don't jump the gun.  As Stan says, there are reasons that we might
> want to protoize the files.  Lets make sure the pros and cons of stub
> protoization are understood, and then make a decision whether to keep
> the work you already have completed or to revert it.

Okay.  However, just so that we have some patches to look at while
we conduct our deliberations, I've appended a patch below which
shows what the reversion patch would look like.

> I'm pretty ambivilent about it myself.  In my experience, beyond toy
> programs, stubs get hacked quite extensively to integrate them into
> the target system.  Removing protototypes would be the least of the
> user's worries.

I see.  I knew that the stubs were examples, but I was also under the
impression that the examples that we include would (or did at one time)
compile on some real system.

Anyway, here's the patch.  I won't commit this one unless we all decide
that it's a good idea to do so.

	* i386-stub.c, m32r-stub.c, m68k-stub.c, sh-stub.c, sparc-stub.c,
	sparcl-stub.c, sparclet-stub.c: Revert protoization changes of
	2000-07-29.

Index: i386-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-stub.c,v
retrieving revision 1.2
diff -u -r1.2 i386-stub.c
--- i386-stub.c	2000/07/30 01:48:25	1.2
+++ i386-stub.c	2000/09/15 18:37:53
@@ -449,7 +449,7 @@
 /* scan for the sequence $<data>#<checksum>     */
 
 unsigned char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -562,7 +562,7 @@
 static volatile int mem_err = 0;
 
 void
-set_mem_err (void)
+set_mem_err ()
 {
   mem_err = 1;
 }
@@ -572,13 +572,16 @@
    to mem_fault, they won't get restored, so there better not be any
    saved).  */
 int
-get_char (char *addr)
+get_char (addr)
+     char *addr;
 {
   return *addr;
 }
 
 void
-set_char (char *addr, int val)
+set_char (addr, val)
+     char *addr;
+     int val;
 {
   *addr = val;
 }
Index: m32r-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/m32r-stub.c,v
retrieving revision 1.3
diff -u -r1.3 m32r-stub.c
--- m32r-stub.c	2000/07/30 01:48:26	1.3
+++ m32r-stub.c	2000/09/15 18:37:54
@@ -535,7 +535,10 @@
 static unsigned long crc32_table[256] = {0, 0};
 
 static unsigned long
-crc32 (unsigned char *buf, int len, unsigned long crc)
+crc32 (buf, len, crc)
+     unsigned char *buf;
+     int len;
+     unsigned long crc;
 {
   if (! crc32_table[1])
     {
@@ -560,7 +563,8 @@
 }
 
 static int 
-hex (unsigned char ch)
+hex(ch)
+     unsigned char ch;
 {
   if ((ch >= 'a') && (ch <= 'f')) return (ch-'a'+10);
   if ((ch >= '0') && (ch <= '9')) return (ch-'0');
@@ -571,7 +575,7 @@
 /* scan for the sequence $<data>#<checksum>     */
 
 unsigned char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -647,7 +651,8 @@
 /* send the packet in buffer.  */
 
 static void 
-putpacket (unsigned char *buffer)
+putpacket(buffer)
+     unsigned char *buffer;
 {
   unsigned char checksum;
   int  count;
@@ -675,7 +680,7 @@
 static void (*volatile mem_fault_routine)() = 0;
 
 static void
-set_mem_err (void)
+set_mem_err ()
 {
   mem_err = 1;
 }
@@ -686,7 +691,8 @@
    whether there's anything connected to the expansion bus. */
 
 static int
-mem_safe (unsigned char *addr)
+mem_safe (addr)
+     unsigned char *addr;
 {
 #define BAD_RANGE_ONE_START	((unsigned char *) 0x600000)
 #define BAD_RANGE_ONE_END	((unsigned char *) 0xa00000)
@@ -704,7 +710,8 @@
    to mem_fault, they won't get restored, so there better not be any
    saved).  */
 static int
-get_char (unsigned char *addr)
+get_char (addr)
+     unsigned char *addr;
 {
 #if 1
   if (mem_fault_routine && !mem_safe(addr))
@@ -717,7 +724,9 @@
 }
 
 static void
-set_char (unsigned char *addr, unsigned char val)
+set_char (addr, val)
+     unsigned char *addr;
+     unsigned char val;
 {
 #if 1
   if (mem_fault_routine && !mem_safe (addr))
@@ -735,7 +744,11 @@
    a fault; if zero treat a fault like any other fault in the stub.  */
 
 static unsigned char *
-mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
+mem2hex(mem, buf, count, may_fault)
+     unsigned char* mem;
+     unsigned char* buf;
+     int   count;
+     int   may_fault;
 {
   int i;
   unsigned char ch;
@@ -759,7 +772,11 @@
    Return a pointer to the character AFTER the last byte written. */
 
 static unsigned char* 
-hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+hex2mem(buf, mem, count, may_fault)
+     unsigned char* buf;
+     unsigned char* mem;
+     int   count;
+     int   may_fault;
 {
   int i;
   unsigned char ch;
@@ -784,7 +801,11 @@
    COUNT is the total number of bytes to write into
    memory. */
 static unsigned char *
-bin2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+bin2mem (buf, mem, count, may_fault)
+     unsigned char *buf;
+     unsigned char *mem;
+     int   count;
+     int   may_fault;
 {
   int i;
   unsigned char ch;
@@ -826,7 +847,8 @@
    translate this number into a unix compatible signal value */
 
 static int 
-computeSignal (int exceptionVector)
+computeSignal(exceptionVector)
+     int exceptionVector;
 {
   int sigval;
   switch (exceptionVector) {
@@ -858,7 +880,9 @@
 /* RETURN NUMBER OF CHARS PROCESSED           */
 /**********************************************/
 static int 
-hexToInt (unsigned char **ptr, int *intValue)
+hexToInt(ptr, intValue)
+     unsigned char **ptr;
+     int *intValue;
 {
   int numChars = 0;
   int hexValue;
@@ -904,7 +928,8 @@
   */
 
 static int 
-isShortBranch (unsigned char *instr)
+isShortBranch(instr)
+     unsigned char *instr;
 {
   unsigned char instr0 = instr[0] & 0x7F;		/* mask off high bit */
 
@@ -923,7 +948,8 @@
 }
 
 static int
-isLongBranch (unsigned char *instr)
+isLongBranch(instr)
+     unsigned char *instr;
 {
   if (instr[0] == 0xFC || instr[0] == 0xFD ||	/* BRA, BNC, BL, BC */
       instr[0] == 0xFE || instr[0] == 0xFF)	/* 24 bit relative */
@@ -949,7 +975,8 @@
     ((((int) addr & 2) || (((unsigned char *) addr)[0] & 0x80) == 0) ? 2 : 4)
 
 static int
-isBranch (unsigned char *instr)
+isBranch(instr)
+     unsigned char *instr;
 {
   if (INSTRUCTION_SIZE(instr) == 2)
     return isShortBranch(instr);
@@ -958,7 +985,8 @@
 }
 
 static int
-willBranch (unsigned char *instr, int branchCode)
+willBranch(instr, branchCode)
+     unsigned char *instr;
 {
   switch (branchCode) 
     {
@@ -1013,7 +1041,8 @@
 }
 
 static int 
-branchDestination (unsigned char *instr, int branchCode)
+branchDestination(instr, branchCode) 
+     unsigned char *instr;
 { 
   switch (branchCode) { 
   default: 
@@ -1044,7 +1073,9 @@
 }
 
 static void
-branchSideEffects (unsigned char *instr, int branchCode)
+branchSideEffects(instr, branchCode)
+     unsigned char *instr;
+     int branchCode;
 {
   switch (branchCode)
     {
@@ -1154,7 +1185,7 @@
 	    just "continue continuing".  */
 
 static int
-finish_from_step (void)
+finish_from_step()
 {
   if (stepping.stepping)	/* anything to do? */
     {
@@ -1245,7 +1276,7 @@
    but doing stash_registers in C isn't straightforward.  */
 
 static void
-cleanup_stash (void)
+cleanup_stash ()
 {
   psw = (struct PSWreg *) &registers[PSW];	/* fields of PSW register */
   psw->sm = psw->bsm;		/* fix up pre-trap values of psw fields */
@@ -1313,7 +1344,8 @@
    NUM is the trap/exception number.  */
 
 static void
-process_exception (int num)
+process_exception (num)
+     int num;
 {
   cleanup_stash ();
   asm volatile ("
@@ -1520,7 +1552,7 @@
 /* this function is used to set up exception handlers for tracing and
    breakpoints */
 void 
-set_debug_traps (void)
+set_debug_traps()
 {
   /*  extern void remcomHandler(); */
   int i;
@@ -1561,7 +1593,7 @@
 #define BREAKPOINT() asm volatile ("	trap #2");
 
 void 
-breakpoint (void)
+breakpoint()
 {
   if (initialized)
     BREAKPOINT();
@@ -1580,7 +1612,8 @@
    Returns: the char */
  
 static int
-gdb_putchar (int ch)
+gdb_putchar(ch)
+     int ch;
 {
   char buf[4];
  
@@ -1597,7 +1630,9 @@
    Returns: number of bytes written */
  
 static int
-gdb_write (char *data, int len)
+gdb_write(data, len)
+     char *data;
+     int len;
 {
   char *buf, *cpy;
   int i;
@@ -1625,7 +1660,8 @@
    Returns: the length of the string */
  
 static int
-gdb_puts (char *str)
+gdb_puts(str)
+     char *str;
 {
   return gdb_write(str, strlen(str));
 }
@@ -1636,7 +1672,9 @@
    will cause the optional second string to be inserted.  */
  
 static void
-gdb_error (char *format, char *parm)
+gdb_error(format, parm)
+     char * format;
+     char * parm;
 {
   char buf[400], *cpy;
   int len;
Index: m68k-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/m68k-stub.c,v
retrieving revision 1.2
diff -u -r1.2 m68k-stub.c
--- m68k-stub.c	2000/07/30 01:48:26	1.2
+++ m68k-stub.c	2000/09/15 18:37:56
@@ -528,7 +528,7 @@
 /* scan for the sequence $<data>#<checksum>     */
   
 unsigned char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -966,7 +966,7 @@
 
 
 void
-initializeRemcomErrorFrame (void)
+initializeRemcomErrorFrame()
 {
     lastFrame = ((Frame *) &gdbFrameStack[FRAMESIZE-1]) - 1;
     lastFrame->previous = lastFrame;
Index: sh-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-stub.c,v
retrieving revision 1.2
diff -u -r1.2 sh-stub.c
--- sh-stub.c	2000/07/30 01:48:27	1.2
+++ sh-stub.c	2000/09/15 18:37:57
@@ -383,7 +383,7 @@
 /* scan for the sequence $<data>#<checksum>     */
 
 char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -802,7 +802,7 @@
 }
 
 void
-gdb_mode (void)
+gdb_mode()
 {
   ingdbmode = GDBCOOKIE;
   breakpoint();
@@ -1324,7 +1324,7 @@
 
 
 static  void
-exceptions (void)
+exceptions()
 {
   code_for_catch_exception (CPU_BUS_ERROR_VEC);
   code_for_catch_exception (DMA_BUS_ERROR_VEC);
@@ -1492,12 +1492,12 @@
 void handleError (char theSSR);
 
 void
-nop (void)
+nop ()
 {
 
 }
 void 
-init_serial (void)
+init_serial()
 {
   int i;
 
@@ -1556,7 +1556,7 @@
 }
 
 int 
-putDebugCharReady (void)
+putDebugCharReady()
 {
   return (SSR1 & SCI_TDRE);
 }
Index: sparc-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/sparc-stub.c,v
retrieving revision 1.2
diff -u -r1.2 sparc-stub.c
--- sparc-stub.c	2000/07/30 01:48:27	1.2
+++ sparc-stub.c	2000/09/15 18:37:57
@@ -269,7 +269,8 @@
 /* Convert ch from a hex digit to an int */
 
 static int
-hex (unsigned char ch)
+hex(ch)
+     unsigned char ch;
 {
   if (ch >= 'a' && ch <= 'f')
     return ch-'a'+10;
@@ -286,7 +287,7 @@
 /* scan for the sequence $<data>#<checksum>     */
 
 unsigned char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -352,7 +353,8 @@
 /* send the packet in buffer.  */
 
 static void
-putpacket (unsigned char *buffer)
+putpacket(buffer)
+     unsigned char *buffer;
 {
   unsigned char checksum;
   int count;
@@ -392,7 +394,11 @@
  */
 
 static unsigned char *
-mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
+mem2hex(mem, buf, count, may_fault)
+     unsigned char *mem;
+     unsigned char *buf;
+     int count;
+     int may_fault;
 {
   unsigned char ch;
 
@@ -418,7 +424,11 @@
  * return a pointer to the character AFTER the last byte written */
 
 static char *
-hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+hex2mem(buf, mem, count, may_fault)
+     unsigned char *buf;
+     unsigned char *mem;
+     int count;
+     int may_fault;
 {
   int i;
   unsigned char ch;
@@ -463,7 +473,7 @@
 /* Set up exception handlers for tracing and breakpoints */
 
 void
-set_debug_traps (void)
+set_debug_traps()
 {
   struct hard_trap_info *ht;
 
@@ -490,7 +500,8 @@
 ");
 
 static void
-set_mem_fault_trap (int enable)
+set_mem_fault_trap(enable)
+     int enable;
 {
   extern void fltr_set_mem_err();
   mem_err = 0;
@@ -504,7 +515,8 @@
 /* Convert the SPARC hardware trap type code to a unix signal number. */
 
 static int
-computeSignal (int tt)
+computeSignal(tt)
+     int tt;
 {
   struct hard_trap_info *ht;
 
@@ -552,7 +564,8 @@
 extern void breakinst();
 
 static void
-handle_exception (unsigned long *registers)
+handle_exception (registers)
+     unsigned long *registers;
 {
   int tt;			/* Trap type */
   int sigval;
@@ -766,7 +779,7 @@
    the debugger. */
 
 void
-breakpoint (void)
+breakpoint()
 {
   if (!initialized)
     return;
Index: sparcl-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/sparcl-stub.c,v
retrieving revision 1.3
diff -u -r1.3 sparcl-stub.c
--- sparcl-stub.c	2000/07/30 01:48:27	1.3
+++ sparcl-stub.c	2000/09/15 18:37:58
@@ -366,7 +366,8 @@
 /* Convert ch from a hex digit to an int */
 
 static int
-hex (unsigned char ch)
+hex(ch)
+     unsigned char ch;
 {
   if (ch >= 'a' && ch <= 'f')
     return ch-'a'+10;
@@ -383,7 +384,7 @@
 /* scan for the sequence $<data>#<checksum>     */
 
 unsigned char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -449,7 +450,8 @@
 /* send the packet in buffer.  */
 
 static void
-putpacket (unsigned char *buffer)
+putpacket(buffer)
+     unsigned char *buffer;
 {
   unsigned char checksum;
   int count;
@@ -489,7 +491,11 @@
  */
 
 static unsigned char *
-mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
+mem2hex(mem, buf, count, may_fault)
+     unsigned char *mem;
+     unsigned char *buf;
+     int count;
+     int may_fault;
 {
   unsigned char ch;
 
@@ -515,7 +521,11 @@
  * return a pointer to the character AFTER the last byte written */
 
 static char *
-hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+hex2mem(buf, mem, count, may_fault)
+     unsigned char *buf;
+     unsigned char *mem;
+     int count;
+     int may_fault;
 {
   int i;
   unsigned char ch;
@@ -566,7 +576,7 @@
 /* Set up exception handlers for tracing and breakpoints */
 
 void
-set_debug_traps (void)
+set_debug_traps()
 {
   struct hard_trap_info *ht;
 
@@ -598,7 +608,8 @@
 ");
 
 static void
-set_mem_fault_trap (int enable)
+set_mem_fault_trap(enable)
+     int enable;
 {
   extern void fltr_set_mem_err();
   mem_err = 0;
@@ -621,7 +632,7 @@
 ");
 
 static void
-get_in_break_mode (void)
+get_in_break_mode()
 {
   extern void dummy_hw_breakpoint();
 
@@ -635,7 +646,8 @@
 /* Convert the SPARC hardware trap type code to a unix signal number. */
 
 static int
-computeSignal (int tt)
+computeSignal(tt)
+     int tt;
 {
   struct hard_trap_info *ht;
 
@@ -681,7 +693,8 @@
  */
 
 static void
-handle_exception (unsigned long *registers)
+handle_exception (registers)
+     unsigned long *registers;
 {
   int tt;			/* Trap type */
   int sigval;
@@ -934,7 +947,7 @@
    the debugger. */
 
 void
-breakpoint (void)
+breakpoint()
 {
   if (!initialized)
     return;
Index: sparclet-stub.c
===================================================================
RCS file: /cvs/src/src/gdb/sparclet-stub.c,v
retrieving revision 1.3
diff -u -r1.3 sparclet-stub.c
--- sparclet-stub.c	2000/07/30 01:48:27	1.3
+++ sparclet-stub.c	2000/09/15 18:37:58
@@ -435,7 +435,8 @@
 /* Convert ch from a hex digit to an int */
 
 static int
-hex (unsigned char ch)
+hex(ch)
+     unsigned char ch;
 {
   if (ch >= 'a' && ch <= 'f')
     return ch-'a'+10;
@@ -452,7 +453,7 @@
 /* scan for the sequence $<data>#<checksum>     */
 
 unsigned char *
-getpacket (void)
+getpacket ()
 {
   unsigned char *buffer = &remcomInBuffer[0];
   unsigned char checksum;
@@ -518,7 +519,8 @@
 /* send the packet in buffer.  */
 
 static void
-putpacket (unsigned char *buffer)
+putpacket(buffer)
+     unsigned char *buffer;
 {
   unsigned char checksum;
   int count;
@@ -558,7 +560,11 @@
  */
 
 static unsigned char *
-mem2hex (unsigned char *mem, unsigned char *buf, int count, int may_fault)
+mem2hex(mem, buf, count, may_fault)
+     unsigned char *mem;
+     unsigned char *buf;
+     int count;
+     int may_fault;
 {
   unsigned char ch;
 
@@ -584,7 +590,11 @@
  * return a pointer to the character AFTER the last byte written */
 
 static char *
-hex2mem (unsigned char *buf, unsigned char *mem, int count, int may_fault)
+hex2mem(buf, mem, count, may_fault)
+     unsigned char *buf;
+     unsigned char *mem;
+     int count;
+     int may_fault;
 {
   int i;
   unsigned char ch;
@@ -630,7 +640,7 @@
 /* Set up exception handlers for tracing and breakpoints */
 
 void
-set_debug_traps (void)
+set_debug_traps()
 {
   struct hard_trap_info *ht;
 
@@ -657,7 +667,8 @@
 ");
 
 static void
-set_mem_fault_trap (int enable)
+set_mem_fault_trap(enable)
+     int enable;
 {
   extern void fltr_set_mem_err();
   mem_err = 0;
@@ -680,7 +691,8 @@
 ");
 
 static void
-set_hw_breakpoint_trap (int enable)
+set_hw_breakpoint_trap(enable)
+     int enable;
 {
   extern void dummy_hw_breakpoint();
 
@@ -691,7 +703,7 @@
 }
 
 static void
-get_in_break_mode (void)
+get_in_break_mode()
 {
 #if 0
   int x;
@@ -715,7 +727,8 @@
 /* Convert the SPARC hardware trap type code to a unix signal number. */
 
 static int
-computeSignal (int tt)
+computeSignal(tt)
+     int tt;
 {
   struct hard_trap_info *ht;
 
@@ -761,7 +774,8 @@
  */
 
 static void
-handle_exception (unsigned long *registers)
+handle_exception (registers)
+     unsigned long *registers;
 {
   int tt;			/* Trap type */
   int sigval;
@@ -1035,7 +1049,7 @@
    the debugger. */
 
 void
-breakpoint (void)
+breakpoint()
 {
   if (!initialized)
     return;
@@ -1047,7 +1061,7 @@
 }
 
 static void
-hw_breakpoint (void)
+hw_breakpoint()
 {
   asm("
       ta 127


       reply	other threads:[~2000-09-15 10:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1000915073306.ZM4195@ocotillo.lan>
2000-09-15 10:50 ` J.T. Conklin [this message]
     [not found]   ` <1000915181249.ZM5172@ocotillo.lan>
     [not found]     ` <5mwvgdy09h.fsf@jtc.redback.com>
     [not found]       ` <1000915185022.ZM5331@ocotillo.lan>
2000-09-15 12:07         ` J.T. Conklin

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=5mk8cdzgri.fsf@jtc.redback.com \
    --to=jtc@redback.com \
    --cc=gdb-patches@sourceware.cygnus.com \
    --cc=kevinb@cygnus.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