Wed Mar 4 15:34:49 1998 Jason Molenda (crash@bugshack.cygnus.com)
* gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
This commit is contained in:
parent
9ce23bf951
commit
d7363521cf
@ -1,3 +1,7 @@
|
|||||||
|
Wed Mar 4 15:34:49 1998 Jason Molenda (crash@bugshack.cygnus.com)
|
||||||
|
|
||||||
|
* gdbtk.c (gdb_listfiles): Allocate space for 'files' dynamically.
|
||||||
|
|
||||||
Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com>
|
Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com>
|
||||||
|
|
||||||
* elfread.c (elf_symtab_read): merge SYMBOL_IS_SPECIAL into
|
* elfread.c (elf_symtab_read): merge SYMBOL_IS_SPECIAL into
|
||||||
@ -6,13 +10,12 @@ Wed Mar 4 01:39:08 1998 Ron Unrau <runrau@cygnus.com>
|
|||||||
|
|
||||||
Tue Mar 3 17:19:08 1998 John Metzler <jmetzler@cygnus.com>
|
Tue Mar 3 17:19:08 1998 John Metzler <jmetzler@cygnus.com>
|
||||||
|
|
||||||
* config/mips/tm-vr4xxx.h : implements vr4111 as saparate from 4300
|
* config/mips/tm-vr4xxx.h: implements vr4111 as saparate from 4300
|
||||||
* config/mips/vr4xxx.tm : implements vr4111 as separate from 4300
|
* config/mips/vr4xxx.tm: implements vr4111 as separate from 4300
|
||||||
* configure.tgt: Recognise mips64vr4111-*-elf as vr4xxx
|
* configure.tgt: Recognise mips64vr4111-*-elf as vr4xxx
|
||||||
* dwarfread.c(read_tag_pointer_type): Pointer sizes now come from
|
* dwarfread.c (read_tag_pointer_type): Pointer sizes now come from
|
||||||
TARGET_PTR_BIT rather from sizeof(char *) on host.
|
TARGET_PTR_BIT rather from sizeof(char *) on host.
|
||||||
|
|
||||||
|
|
||||||
Tue Mar 3 14:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
Tue Mar 3 14:37:02 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||||
|
|
||||||
* alpha-nat.c (fetch_osf_core_registers): Renamed from
|
* alpha-nat.c (fetch_osf_core_registers): Renamed from
|
||||||
|
17
gdb/gdbtk.c
17
gdb/gdbtk.c
@ -1217,10 +1217,14 @@ gdb_listfiles (clientData, interp, objc, objv)
|
|||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
struct partial_symtab *psymtab;
|
struct partial_symtab *psymtab;
|
||||||
struct symtab *symtab;
|
struct symtab *symtab;
|
||||||
char *lastfile, *pathname, *files[1000];
|
char *lastfile, *pathname, **files;
|
||||||
|
int files_size;
|
||||||
int i, numfiles = 0, len = 0;
|
int i, numfiles = 0, len = 0;
|
||||||
Tcl_Obj *mylist;
|
Tcl_Obj *mylist;
|
||||||
|
|
||||||
|
files_size = 1000;
|
||||||
|
files = (char **) xmalloc (sizeof (char **) * files_size);
|
||||||
|
|
||||||
if (objc > 2)
|
if (objc > 2)
|
||||||
{
|
{
|
||||||
Tcl_WrongNumArgs (interp, 1, objv, "Usage: gdb_listfiles ?pathname?");
|
Tcl_WrongNumArgs (interp, 1, objv, "Usage: gdb_listfiles ?pathname?");
|
||||||
@ -1233,6 +1237,11 @@ gdb_listfiles (clientData, interp, objc, objv)
|
|||||||
|
|
||||||
ALL_PSYMTABS (objfile, psymtab)
|
ALL_PSYMTABS (objfile, psymtab)
|
||||||
{
|
{
|
||||||
|
if (numfiles == files_size)
|
||||||
|
{
|
||||||
|
files_size = files_size * 2;
|
||||||
|
files = (char **) xrealloc (files, sizeof (char **) * files_size);
|
||||||
|
}
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
{
|
{
|
||||||
if (psymtab->filename)
|
if (psymtab->filename)
|
||||||
@ -1246,6 +1255,11 @@ gdb_listfiles (clientData, interp, objc, objv)
|
|||||||
|
|
||||||
ALL_SYMTABS (objfile, symtab)
|
ALL_SYMTABS (objfile, symtab)
|
||||||
{
|
{
|
||||||
|
if (numfiles == files_size)
|
||||||
|
{
|
||||||
|
files_size = files_size * 2;
|
||||||
|
files = (char **) xrealloc (files, sizeof (char **) * files_size);
|
||||||
|
}
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
{
|
{
|
||||||
if (symtab->filename)
|
if (symtab->filename)
|
||||||
@ -1267,6 +1281,7 @@ gdb_listfiles (clientData, interp, objc, objv)
|
|||||||
lastfile = files[i];
|
lastfile = files[i];
|
||||||
}
|
}
|
||||||
Tcl_SetObjResult (interp, mylist);
|
Tcl_SetObjResult (interp, mylist);
|
||||||
|
free (files);
|
||||||
return TCL_OK;
|
return TCL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user