* stabsread.c (get_substring): Declare second arg as int.

* remote-es.c: Include gdb_string.h after defs.h.
This commit is contained in:
Stan Shebs
1996-07-31 01:07:30 +00:00
parent 2019ff6ad5
commit cb74cc240d
3 changed files with 56 additions and 32 deletions

View File

@ -1,3 +1,9 @@
Tue Jul 30 17:57:46 1996 Stan Shebs <shebs@andros.cygnus.com>
* stabsread.c (get_substring): Declare second arg as int.
* remote-es.c: Include gdb_string.h after defs.h.
Mon Jul 29 21:13:20 1996 Fred Fish <fnf@cygnus.com> Mon Jul 29 21:13:20 1996 Fred Fish <fnf@cygnus.com>
* rs6000-tdep.c (push_arguments): Remove unused variable "pc". * rs6000-tdep.c (push_arguments): Remove unused variable "pc".
@ -212,7 +218,9 @@ Fri Jul 26 14:07:37 1996 Ian Lance Taylor <ian@cygnus.com>
* printcmd.c (_initialize_printcmd): Initialize * printcmd.c (_initialize_printcmd): Initialize
tm_print_insn_info.flavour. tm_print_insn_info.flavour.
start-sanitize-gdbtk
* gdbtk.c (gdb_disassemble): Initialize di.flavour. * gdbtk.c (gdb_disassemble): Initialize di.flavour.
end-sanitize-gdbtk
Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com> Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
@ -254,7 +262,6 @@ Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
(strerror): Ditto. (strerror): Ditto.
* f-valprint.c (f77_print_array_1): Remove extra arg that was being * f-valprint.c (f77_print_array_1): Remove extra arg that was being
passed to f77_print_array_1. passed to f77_print_array_1.
* gdbtk.c (register_changed_p): Remove unused local variable "buf".
* gdbtypes.c (add_name): Remove unused variables lenstrlen and lenstr. * gdbtypes.c (add_name): Remove unused variables lenstrlen and lenstr.
* scm-exp.c (scm_istr2int): Remove unused variable "j". * scm-exp.c (scm_istr2int): Remove unused variable "j".
(scm_parse): Remove unused variable "str". (scm_parse): Remove unused variable "str".
@ -496,6 +503,7 @@ Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
(debug_to_notice_signals): Ditto. (debug_to_notice_signals): Ditto.
(debug_to_thread_alive): Ditto. (debug_to_thread_alive): Ditto.
(debug_to_stop): Ditto. (debug_to_stop): Ditto.
start-sanitize-gdbtk
* gdbtk.c (null_routine): Ditto. * gdbtk.c (null_routine): Ditto.
(gdbtk_flush): Ditto. (gdbtk_flush): Ditto.
(gdbtk_fputs): Ditto. (gdbtk_fputs): Ditto.
@ -533,6 +541,7 @@ Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
(gdbtk_call_command): Ditto. (gdbtk_call_command): Ditto.
(tk_command_loop): Ditto. (tk_command_loop): Ditto.
(gdbtk_init): Ditto. (gdbtk_init): Ditto.
end-sanitize-gdbtk
* breakpoint.h (set_breakpoint_sal): Ditto. * breakpoint.h (set_breakpoint_sal): Ditto.
* remote-utils.c (usage): Ditto. * remote-utils.c (usage): Ditto.
* remote.c (set_thread): Ditto. * remote.c (set_thread): Ditto.
@ -721,9 +730,11 @@ Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
uninitialized. uninitialized.
* utils.c (vfprintf_maybe_filtered): Change second arg from "char *" * utils.c (vfprintf_maybe_filtered): Change second arg from "char *"
to "const char *". to "const char *".
start-sanitize-gdbtk
* gdbtk.c (gdb_fetch_registers): Cast fourth arg to map_arg_registers * gdbtk.c (gdb_fetch_registers): Cast fourth arg to map_arg_registers
to proper pointer type, from int. to proper pointer type, from int.
(gdbtk_query): Change first arg to "const char *" from "char *". (gdbtk_query): Change first arg to "const char *" from "char *".
end-sanitize-gdbtk
* infptrace.c (udot_info): Add two dummy args so that the type is * infptrace.c (udot_info): Add two dummy args so that the type is
correct for passing to add_info. correct for passing to add_info.
* f-lang.c (saved_fcn): Move decl to head of file so it can be used * f-lang.c (saved_fcn): Move decl to head of file so it can be used
@ -750,6 +761,9 @@ Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com>
* eval.c (init_array_element): Declare previously undeclared * eval.c (init_array_element): Declare previously undeclared
last two args as LONGEST. last two args as LONGEST.
* dcache.c (dcache_xfer_memory): Change xfunc decls to prototype form. * dcache.c (dcache_xfer_memory): Change xfunc decls to prototype form.
start-sanitize-gdbtk
* gdbtk.c (register_changed_p): Remove unused local variable "buf".
end-sanitize-gdbtk
Thu Jul 25 16:11:54 1996 Doug Evans <dje@canuck.cygnus.com> Thu Jul 25 16:11:54 1996 Doug Evans <dje@canuck.cygnus.com>
@ -766,12 +780,14 @@ Mon Jul 22 18:13:27 1996 Stu Grossman (grossman@critters.cygnus.com)
partial-stab.h. partial-stab.h.
* stabsread.h (end_psymtab): Add textlow_not_set arg to prototype. * stabsread.h (end_psymtab): Add textlow_not_set arg to prototype.
start-sanitize-gdbtk
Sat Jul 20 17:46:40 1996 Fred Fish <fnf@cygnus.com> Sat Jul 20 17:46:40 1996 Fred Fish <fnf@cygnus.com>
* gdbtk.tcl (files_command): Reorder the binding tags for * gdbtk.tcl (files_command): Reorder the binding tags for
the listbox widget to avoid referencing the listbox after the listbox widget to avoid referencing the listbox after
the containing widget has been destroyed by the action of the containing widget has been destroyed by the action of
a previous binding. a previous binding.
end-sanitize-gdbtk
Sat Jul 20 10:41:06 1996 Fred Fish <fnf@cygnus.com> Sat Jul 20 10:41:06 1996 Fred Fish <fnf@cygnus.com>
@ -779,6 +795,7 @@ Sat Jul 20 10:41:06 1996 Fred Fish <fnf@cygnus.com>
to "struct fileinfo" to avoid conflict with "struct file" in to "struct fileinfo" to avoid conflict with "struct file" in
<sys/file.h> on HPUX and Solaris. <sys/file.h> on HPUX and Solaris.
start-sanitize-gdbtk
Sat Jul 20 10:09:28 1996 Fred Fish <fnf@cygnus.com> Sat Jul 20 10:09:28 1996 Fred Fish <fnf@cygnus.com>
* gdbtk.tcl (delete_expr): Unset corresponding element of * gdbtk.tcl (delete_expr): Unset corresponding element of
@ -786,6 +803,7 @@ Sat Jul 20 10:09:28 1996 Fred Fish <fnf@cygnus.com>
(create_expr_window): Initialize expr_num, delete_expr_num, (create_expr_window): Initialize expr_num, delete_expr_num,
and expr_update_list here when each new expression window and expr_update_list here when each new expression window
is created, rather than once at startup. is created, rather than once at startup.
end-sanitize-gdbtk
Fri Jul 19 14:05:57 1996 Stan Shebs <shebs@andros.cygnus.com> Fri Jul 19 14:05:57 1996 Stan Shebs <shebs@andros.cygnus.com>
@ -832,8 +850,10 @@ Mon Jul 15 16:44:05 1996 Stu Grossman (grossman@critters.cygnus.com)
* defs.h printcmd.c: Create global disassemble_info structure * defs.h printcmd.c: Create global disassemble_info structure
tm_print_insn_info. tm_print_insn_info.
start-sanitize-gdbtk
* gdbtk.c (gdb_disassemble): Setup di.mach from * gdbtk.c (gdb_disassemble): Setup di.mach from
tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER. tm_print_insn_info.mach, and set endian from TARGET_BYTE_ORDER.
end-sanitize-gdbtk
* i386-tdep.c (set_assembly_language_command): set * i386-tdep.c (set_assembly_language_command): set
tm_print_insn_info.mach to the appropriate value for 386 or 8086 tm_print_insn_info.mach to the appropriate value for 386 or 8086
disassembly. disassembly.

View File

@ -96,10 +96,10 @@ STP
#include <sys/file.h> #include <sys/file.h>
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
#include "gdb_string.h"
#include <setjmp.h> #include <setjmp.h>
#include <fcntl.h> #include <fcntl.h>
#include "defs.h" #include "defs.h"
#include "gdb_string.h"
#include "frame.h" #include "frame.h"
#include "inferior.h" #include "inferior.h"
#include "target.h" #include "target.h"

View File

@ -80,7 +80,7 @@ read_one_struct_field PARAMS ((struct field_info *, char **, char *,
struct type *, struct objfile *)); struct type *, struct objfile *));
static char * static char *
get_substring PARAMS ((char **, char)); get_substring PARAMS ((char **, int));
static struct type * static struct type *
dbx_alloc_type PARAMS ((int [2], struct objfile *)); dbx_alloc_type PARAMS ((int [2], struct objfile *));
@ -538,16 +538,17 @@ read_type_number (pp, typenums)
/* This code added to support parsing of ARM/Cfront stabs strings */ /* This code added to support parsing of ARM/Cfront stabs strings */
/* get substring from string up to char c /* Get substring from string up to char c, advance string pointer past
advance string pointer past suibstring */ suibstring. */
static char * static char *
get_substring(p, c) get_substring (p, c)
char ** p; char ** p;
char c; int c;
{ {
char * str; char *str;
str = *p; str = *p;
*p = strchr(*p,c); *p = strchr (*p, c);
if (*p) if (*p)
{ {
**p = 0; **p = 0;
@ -558,35 +559,36 @@ get_substring(p, c)
return str; return str;
} }
/* Physname gets strcat'd onto sname in order to recreate the mangled name /* Physname gets strcat'd onto sname in order to recreate the mangled
(see funtion gdb_mangle_name in gdbtypes.c). For cfront, make the physname name (see funtion gdb_mangle_name in gdbtypes.c). For cfront, make
look like that of g++ - take out the initial mangling the physname look like that of g++ - take out the initial mangling
eg: for sname="a" and fname="foo__1aFPFs_i" return "FPFs_i" */ eg: for sname="a" and fname="foo__1aFPFs_i" return "FPFs_i" */
static char * static char *
get_cfront_method_physname(fname) get_cfront_method_physname (fname)
char * fname; char *fname;
{ {
int len=0; int len = 0;
/* FIXME would like to make this generic for g++ too, but /* FIXME would like to make this generic for g++ too, but
that is already handled in read_member_funcctions */ that is already handled in read_member_funcctions */
char * p = fname; char * p = fname;
/* search ahead to find the start of the mangled suffix */ /* search ahead to find the start of the mangled suffix */
if (*p == '_' && *(p+1)=='_') /* compiler generated; probably a ctor/dtor */ if (*p == '_' && *(p+1)=='_') /* compiler generated; probably a ctor/dtor */
p+=2; p += 2;
while (p && ((p+1) - fname) < strlen(fname) && *(p+1)!='_') while (p && ((p+1) - fname) < strlen (fname) && *(p+1) != '_')
p = strchr(p,'_'); p = strchr (p, '_');
if (!(p && *p=='_' && *(p+1)=='_')) if (!(p && *p == '_' && *(p+1) == '_'))
error("Invalid mangled function name %s",fname); error ("Invalid mangled function name %s",fname);
p+=2; /* advance past '__' */ p += 2; /* advance past '__' */
/* struct name length and name of type should come next; advance past it */ /* struct name length and name of type should come next; advance past it */
while (isdigit(*p)) while (isdigit (*p))
{ {
len = len*10 + (*p - '0'); len = len * 10 + (*p - '0');
p++; p++;
} }
p+=len; p += len;
return p; return p;
} }
@ -598,12 +600,13 @@ get_cfront_method_physname(fname)
A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;; A:ZcA;;foopri__1AFv foopro__1AFv __ct__1AFv __ct__1AFRC1A foopub__1AFv ;;;
^ ^
*/ */
static int static int
read_cfront_baseclasses(fip, pp, type, objfile) read_cfront_baseclasses (fip, pp, type, objfile)
struct field_info *fip; struct field_info *fip;
struct objfile * objfile; struct objfile *objfile;
char ** pp; char ** pp;
struct type * type; struct type *type;
{ {
static struct complaint msg_unknown = {"\ static struct complaint msg_unknown = {"\
Unsupported token in stabs string %s.\n", Unsupported token in stabs string %s.\n",
@ -611,21 +614,22 @@ read_cfront_baseclasses(fip, pp, type, objfile)
static struct complaint msg_notfound = {"\ static struct complaint msg_notfound = {"\
Unable to find base type for %s.\n", Unable to find base type for %s.\n",
0, 0}; 0, 0};
int bnum=0; int bnum = 0;
char * p; char * p;
int i; int i;
struct nextfield *new; struct nextfield *new;
if (**pp==';') /* no base classes; return */ if (**pp == ';') /* no base classes; return */
{ {
++(*pp); ++(*pp);
return 1; return 1;
} }
/* first count base classes so we can allocate space before parsing */ /* first count base classes so we can allocate space before parsing */
for (p = *pp; p && *p && *p!=';'; p++) for (p = *pp; p && *p && *p != ';'; p++)
{ {
if (*p==' ') bnum++; if (*p == ' ')
bnum++;
} }
bnum++; /* add one more for last one */ bnum++; /* add one more for last one */
@ -638,12 +642,12 @@ read_cfront_baseclasses(fip, pp, type, objfile)
{ {
int num_bytes = B_BYTES (TYPE_N_BASECLASSES (type)); int num_bytes = B_BYTES (TYPE_N_BASECLASSES (type));
char *pointer; char *pointer;
pointer = (char *) TYPE_ALLOC (type, num_bytes); pointer = (char *) TYPE_ALLOC (type, num_bytes);
TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer; TYPE_FIELD_VIRTUAL_BITS (type) = (B_TYPE *) pointer;
} }
B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), TYPE_N_BASECLASSES (type)); B_CLRALL (TYPE_FIELD_VIRTUAL_BITS (type), TYPE_N_BASECLASSES (type));
for (i = 0; i < TYPE_N_BASECLASSES (type); i++) for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
{ {
new = (struct nextfield *) xmalloc (sizeof (struct nextfield)); new = (struct nextfield *) xmalloc (sizeof (struct nextfield));