* [RFA] Change malloc to xmalloc
@ 2001-01-23 14:25 Rudy Folden
2001-01-23 14:59 ` Kevin Buettner
0 siblings, 1 reply; 2+ messages in thread
From: Rudy Folden @ 2001-01-23 14:25 UTC (permalink / raw)
To: gdb-patches
Changed calls within gdb from malloc to xmalloc. Of course, the file
utils.c can not be changed since it implements xmalloc via a call to mmalloc
which in turn calls the real malloc.
This has been tested on a Red Hat Linux 7.0 system.
2001-01-22 Rudy Folden <rfolden@redhat.com>
* defs.h: Changed all occurances of malloc to xmalloc
* gdbtypes.c: Likewise.
* gnu-nat.c: Likewise.
* hp-psymtab-read.c: Likewise.
* infttrace.c: Likewise.
* procfs.c: Likewise.
* remote-rdp.c: Likewise.
* stop-gdb.c: Likewise.
* stuff.c: Likewise.
* valprint.c: Likewise.
* config/pa/xm-hppah.h: Likewise.
Index: defs.h
===================================================================
RCS file: /cvs/src/src/gdb/defs.h,v
retrieving revision 1.34
diff -c -3 -p -r1.34 defs.h
*** defs.h 2001/01/19 08:01:46 1.34
--- defs.h 2001/01/23 21:01:16
*************** extern double atof (const char *); /* X3
*** 962,968 ****
#ifndef MALLOC_INCOMPATIBLE
#ifdef NEED_DECLARATION_MALLOC
! extern PTR malloc ();
#endif
#ifdef NEED_DECLARATION_REALLOC
--- 962,968 ----
#ifndef MALLOC_INCOMPATIBLE
#ifdef NEED_DECLARATION_MALLOC
! extern PTR xmalloc ();
#endif
#ifdef NEED_DECLARATION_REALLOC
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.16
diff -c -3 -p -r1.16 gdbtypes.c
*** gdbtypes.c 2000/12/15 01:01:47 1.16
--- gdbtypes.c 2001/01/23 21:01:19
*************** cfront_mangle_name (struct type *type, i
*** 1350,1356 ****
}
ADD_EXTRA ('\0')
printf ("add_mangled_type: %s\n", extras.str); /* FIXME */
! arm_mangled_name = malloc (strlen (mangled_name) + extras.len);
sprintf (arm_mangled_name, "%s%s", mangled_name, extras.str);
xfree (mangled_name);
mangled_name = arm_mangled_name;
--- 1350,1356 ----
}
ADD_EXTRA ('\0')
printf ("add_mangled_type: %s\n", extras.str); /* FIXME */
! arm_mangled_name = xmalloc (strlen (mangled_name) + extras.len);
sprintf (arm_mangled_name, "%s%s", mangled_name, extras.str);
xfree (mangled_name);
mangled_name = arm_mangled_name;
Index: gnu-nat.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-nat.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 gnu-nat.c
*** gnu-nat.c 2000/12/15 01:01:47 1.9
--- gnu-nat.c 2001/01/23 21:01:23
*************** make_proc (struct inf *inf, mach_port_t
*** 538,544 ****
{
error_t err;
mach_port_t prev_port = MACH_PORT_NULL;
! struct proc *proc = malloc (sizeof (struct proc));
proc->port = port;
proc->tid = tid;
--- 538,544 ----
{
error_t err;
mach_port_t prev_port = MACH_PORT_NULL;
! struct proc *proc = xmalloc (sizeof (struct proc));
proc->port = port;
proc->tid = tid;
*************** _proc_free (struct proc *proc)
*** 635,641 ****
struct inf *
make_inf (void)
{
! struct inf *inf = malloc (sizeof (struct inf));
if (!inf)
return 0;
--- 635,641 ----
struct inf *
make_inf (void)
{
! struct inf *inf = xmalloc (sizeof (struct inf));
if (!inf)
return 0;
Index: hp-psymtab-read.c
===================================================================
RCS file: /cvs/src/src/gdb/hp-psymtab-read.c,v
retrieving revision 1.8
diff -c -3 -p -r1.8 hp-psymtab-read.c
*** hp-psymtab-read.c 2000/12/15 01:01:47 1.8
--- hp-psymtab-read.c 2001/01/23 21:01:25
*************** hpread_call_pxdb (char *file_name)
*** 118,124 ****
if (file_exists (PXDB_SVR4))
{
! p = malloc (strlen (PXDB_SVR4) + strlen (file_name) + 2);
strcpy (p, PXDB_SVR4);
strcat (p, " ");
strcat (p, file_name);
--- 118,124 ----
if (file_exists (PXDB_SVR4))
{
! p = xmalloc (strlen (PXDB_SVR4) + strlen (file_name) + 2);
strcpy (p, PXDB_SVR4);
strcat (p, " ");
strcat (p, file_name);
*************** hpread_quick_traverse (struct objfile *o
*** 946,952 ****
static_syms);
/* Set up to only enter each class referenced in this module once.
*/
! class_entered = malloc (B_BYTES (pxdb_header_p->cd_entries));
B_CLRALL (class_entered, pxdb_header_p->cd_entries);
/* Scan the procedure descriptors for procedures in the current
--- 946,952 ----
static_syms);
/* Set up to only enter each class referenced in this module once.
*/
! class_entered = xmalloc (B_BYTES (pxdb_header_p->cd_entries));
B_CLRALL (class_entered, pxdb_header_p->cd_entries);
/* Scan the procedure descriptors for procedures in the current
*************** hpread_quick_traverse (struct objfile *o
*** 1174,1180 ****
static_syms);
/* Set up to only enter each class referenced in this module once.
*/
! class_entered = malloc (B_BYTES (pxdb_header_p->cd_entries));
B_CLRALL (class_entered, pxdb_header_p->cd_entries);
/* Scan the procedure descriptors for procedures in the current
--- 1174,1180 ----
static_syms);
/* Set up to only enter each class referenced in this module once.
*/
! class_entered = xmalloc (B_BYTES (pxdb_header_p->cd_entries));
B_CLRALL (class_entered, pxdb_header_p->cd_entries);
/* Scan the procedure descriptors for procedures in the current
Index: infttrace.c
===================================================================
RCS file: /cvs/src/src/gdb/infttrace.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 infttrace.c
*** infttrace.c 2000/12/15 01:01:47 1.7
--- infttrace.c 2001/01/23 21:01:33
*************** create_thread_info (int pid, lwpid_t tid
*** 601,607 ****
thread_info *p;
int thread_count_of_pid;
! new_p = malloc (sizeof (thread_info));
new_p->pid = pid;
new_p->tid = tid;
new_p->have_signal = 0;
--- 601,607 ----
thread_info *p;
int thread_count_of_pid;
! new_p = xmalloc (sizeof (thread_info));
new_p->pid = pid;
new_p->tid = tid;
new_p->have_signal = 0;
*************** kill_inferior (void)
*** 3829,3835 ****
zaps the target vector.
*/
! paranoia = (thread_info **) malloc (thread_head.count *
sizeof (thread_info *));
para_count = 0;
--- 3829,3835 ----
zaps the target vector.
*/
! paranoia = (thread_info **) xmalloc (thread_head.count *
sizeof (thread_info *));
para_count = 0;
Index: procfs.c
===================================================================
RCS file: /cvs/src/src/gdb/procfs.c,v
retrieving revision 1.22
diff -c -3 -p -r1.22 procfs.c
*** procfs.c 2001/01/16 17:41:51 1.22
--- procfs.c 2001/01/23 21:01:37
*************** proc_update_threads (procinfo *pi)
*** 2876,2883 ****
return 1; /* Process is not multi-threaded; nothing to do. */
if ((prstatus = (gdb_prstatus_t *)
! malloc (sizeof (gdb_prstatus_t) * (nlwp + 1))) == 0)
! perror_with_name ("procfs: malloc failed in update_threads");
old_chain = make_cleanup (xfree, prstatus);
if (ioctl (pi->ctl_fd, PIOCLSTATUS, prstatus) < 0)
--- 2876,2883 ----
return 1; /* Process is not multi-threaded; nothing to do. */
if ((prstatus = (gdb_prstatus_t *)
! xmalloc (sizeof (gdb_prstatus_t) * (nlwp + 1))) == 0)
! perror_with_name ("procfs: xmalloc failed in update_threads");
old_chain = make_cleanup (xfree, prstatus);
if (ioctl (pi->ctl_fd, PIOCLSTATUS, prstatus) < 0)
*************** proc_update_threads (procinfo *pi)
*** 2983,2990 ****
if (nthreads < 2)
return 0; /* nothing to do for 1 or fewer threads */
! if ((threads = malloc (nthreads * sizeof (tid_t))) == NULL)
! proc_error (pi, "update_threads, malloc", __LINE__);
if (ioctl (pi->ctl_fd, PIOCTLIST, threads) < 0)
proc_error (pi, "procfs: update_threads (PIOCTLIST)", __LINE__);
--- 2983,2990 ----
if (nthreads < 2)
return 0; /* nothing to do for 1 or fewer threads */
! if ((threads = xmalloc (nthreads * sizeof (tid_t))) == NULL)
! proc_error (pi, "update_threads, xmalloc", __LINE__);
if (ioctl (pi->ctl_fd, PIOCTLIST, threads) < 0)
proc_error (pi, "procfs: update_threads (PIOCTLIST)", __LINE__);
Index: remote-rdp.c
===================================================================
RCS file: /cvs/src/src/gdb/remote-rdp.c,v
retrieving revision 1.8
diff -c -3 -p -r1.8 remote-rdp.c
*** remote-rdp.c 2000/12/15 01:01:49 1.8
--- remote-rdp.c 2001/01/23 21:01:38
*************** rdp_set_command_line (char *command, cha
*** 698,704 ****
if (commandline != NULL)
xfree (commandline);
! commandline = malloc (strlen (command) + strlen (args) + 2);
if (commandline != NULL)
{
strcpy (commandline, command);
--- 698,704 ----
if (commandline != NULL)
xfree (commandline);
! commandline = xmalloc (strlen (command) + strlen (args) + 2);
if (commandline != NULL)
{
strcpy (commandline, command);
Index: stop-gdb.c
===================================================================
RCS file: /cvs/src/src/gdb/stop-gdb.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 stop-gdb.c
*** stop-gdb.c 2000/07/30 01:48:27 1.2
--- stop-gdb.c 2001/01/23 21:01:38
*************** main (int argc, char **argv)
*** 65,71 ****
else
host = (char *) "";
! name = malloc (strlen (argv[1]) + sizeof (GDB_NAME_PREFIX));
if (name == NULL)
{
fprintf (stderr, "Unable to allocate memory for name.");
--- 65,71 ----
else
host = (char *) "";
! name = xmalloc (strlen (argv[1]) + sizeof (GDB_NAME_PREFIX));
if (name == NULL)
{
fprintf (stderr, "Unable to allocate memory for name.");
Index: stuff.c
===================================================================
RCS file: /cvs/src/src/gdb/stuff.c,v
retrieving revision 1.2
diff -c -3 -p -r1.2 stuff.c
*** stuff.c 2000/07/30 01:48:27 1.2
--- stuff.c 2001/01/23 21:01:38
*************** get_offset (char *file, char *sym_name)
*** 111,117 ****
err ("File %s not an a.out file\n", file);
/* read in symbol table */
! if ((symbol_table = (struct nlist *) malloc (file_hdr.a_syms)) == 0)
err ("Couldn't allocate space for symbol table\n");
if (lseek (f, N_SYMOFF (file_hdr), 0) == -1)
err ("lseek error: %s\n", strerror (errno));
--- 111,117 ----
err ("File %s not an a.out file\n", file);
/* read in symbol table */
! if ((symbol_table = (struct nlist *) xmalloc (file_hdr.a_syms)) == 0)
err ("Couldn't allocate space for symbol table\n");
if (lseek (f, N_SYMOFF (file_hdr), 0) == -1)
err ("lseek error: %s\n", strerror (errno));
*************** get_offset (char *file, char *sym_name)
*** 122,128 ****
/* read in string table */
if (read (f, &size, 4) == -1)
err ("reading string table size: %s\n", strerror (errno));
! if ((strings = (char *) malloc (size)) == 0)
err ("Couldn't allocate memory for string table\n");
if (read (f, strings, size - 4) == -1)
err ("reading string table: %s\n", strerror (errno));
--- 122,128 ----
/* read in string table */
if (read (f, &size, 4) == -1)
err ("reading string table size: %s\n", strerror (errno));
! if ((strings = (char *) xmalloc (size)) == 0)
err ("Couldn't allocate memory for string table\n");
if (read (f, strings, size - 4) == -1)
err ("reading string table: %s\n", strerror (errno));
Index: valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/valprint.c,v
retrieving revision 1.9
diff -c -3 -p -r1.9 valprint.c
*** valprint.c 2000/12/15 01:01:50 1.9
--- valprint.c 2001/01/23 21:01:45
*************** print_decimal_chars (struct ui_file *str
*** 886,892 ****
* as the base 16 number, which is 2 digits per byte.
*/
decimal_len = len * 2 * 2;
! digits = (unsigned char *) malloc (decimal_len);
if (digits == NULL)
error ("Can't allocate memory for conversion to decimal.");
--- 886,892 ----
* as the base 16 number, which is 2 digits per byte.
*/
decimal_len = len * 2 * 2;
! digits = (unsigned char *) xmalloc (decimal_len);
if (digits == NULL)
error ("Can't allocate memory for conversion to decimal.");
Index: config/pa/xm-hppah.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/xm-hppah.h,v
retrieving revision 1.2
diff -c -3 -p -r1.2 xm-hppah.h
*** xm-hppah.h 2000/05/28 01:12:37 1.2
--- xm-hppah.h 2001/01/23 21:01:47
***************
*** 40,46 ****
#define MALLOC_INCOMPATIBLE
! extern void *malloc (size_t);
extern void *realloc (void *, size_t);
--- 40,46 ----
#define MALLOC_INCOMPATIBLE
! extern void *xmalloc (size_t);
extern void *realloc (void *, size_t);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] Change malloc to xmalloc
2001-01-23 14:25 [RFA] Change malloc to xmalloc Rudy Folden
@ 2001-01-23 14:59 ` Kevin Buettner
0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2001-01-23 14:59 UTC (permalink / raw)
To: Rudy Folden, gdb-patches
On Jan 23, 4:13pm, Rudy Folden wrote:
> Changed calls within gdb from malloc to xmalloc. Of course, the file
> utils.c can not be changed since it implements xmalloc via a call to mmalloc
> which in turn calls the real malloc.
I'm wondering if the NEED_DECLARATION_MALLOC stuff from defs.h ought
to be left alone, but moved to utils.c (which is the only place from
which malloc() is actually called).
[...]
> --- 962,968 ----
> #ifndef MALLOC_INCOMPATIBLE
>
> #ifdef NEED_DECLARATION_MALLOC
> ! extern PTR xmalloc ();
> #endif
>
> #ifdef NEED_DECLARATION_REALLOC
Also, when you change something with PTR in it, just change the ``PTR''
to ``void *''.
[...]
> Index: stuff.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/stuff.c,v
> retrieving revision 1.2
I think you should leave stuff.c alone. It's a stand-alone program
that doesn't link in utils.c. (Actually, I think stuff.c ought
to be marked obsolete and eventually deleted.)
[...]
> *** valprint.c 2000/12/15 01:01:50 1.9
> --- valprint.c 2001/01/23 21:01:45
> *************** print_decimal_chars (struct ui_file *str
> *** 886,892 ****
> * as the base 16 number, which is 2 digits per byte.
> */
> decimal_len = len * 2 * 2;
> ! digits = (unsigned char *) malloc (decimal_len);
> if (digits == NULL)
> error ("Can't allocate memory for conversion to decimal.");
>
> --- 886,892 ----
> * as the base 16 number, which is 2 digits per byte.
> */
> decimal_len = len * 2 * 2;
> ! digits = (unsigned char *) xmalloc (decimal_len);
> if (digits == NULL)
> error ("Can't allocate memory for conversion to decimal.");
Again, while you're at it, I think the typecast can go away.
> Index: config/pa/xm-hppah.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/config/pa/xm-hppah.h,v
> retrieving revision 1.2
> diff -c -3 -p -r1.2 xm-hppah.h
> *** xm-hppah.h 2000/05/28 01:12:37 1.2
> --- xm-hppah.h 2001/01/23 21:01:47
> ***************
> *** 40,46 ****
>
> #define MALLOC_INCOMPATIBLE
>
> ! extern void *malloc (size_t);
>
> extern void *realloc (void *, size_t);
>
> --- 40,46 ----
>
> #define MALLOC_INCOMPATIBLE
>
> ! extern void *xmalloc (size_t);
>
> extern void *realloc (void *, size_t);
We shouldn't need to declare xmalloc() here at all. (Nor realloc()
either.)
From jimb@zwingli.cygnus.com Tue Jan 23 16:21:00 2001
From: Jim Blandy <jimb@zwingli.cygnus.com>
To: gdb-patches@sources.redhat.com
Subject: [PATCH]: Read `const' and `volatile' in Dwarf 2 info
Date: Tue, 23 Jan 2001 16:21:00 -0000
Message-id: <200101240021.TAA25079@zwingli.cygnus.com>
X-SW-Source: 2001-01/msg00218.html
Content-length: 1869
2001-01-23 Jim Blandy <jimb@redhat.com>
* dwarf2read.c (read_tag_const_type, read_tag_volatile_type):
Implement these correctly, using make_cv_type.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.20
diff -c -r1.20 dwarf2read.c
*** dwarf2read.c 2000/12/15 01:01:46 1.20
--- dwarf2read.c 2001/01/24 00:15:35
***************
*** 2653,2678 ****
read_tag_const_type (struct die_info *die, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
if (die->type)
{
return;
}
! complain (&dwarf2_const_ignored);
! die->type = die_type (die, objfile, cu_header);
}
static void
read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
if (die->type)
{
return;
}
! complain (&dwarf2_volatile_ignored);
! die->type = die_type (die, objfile, cu_header);
}
/* Extract all information from a DW_TAG_string_type DIE and add to
--- 2653,2682 ----
read_tag_const_type (struct die_info *die, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
+ struct type *base_type;
+
if (die->type)
{
return;
}
! base_type = die_type (die, objfile, cu_header);
! die->type = make_cv_type (1, TYPE_VOLATILE (base_type), base_type, 0);
}
static void
read_tag_volatile_type (struct die_info *die, struct objfile *objfile,
const struct comp_unit_head *cu_header)
{
+ struct type *base_type;
+
if (die->type)
{
return;
}
! base_type = die_type (die, objfile, cu_header);
! die->type = make_cv_type (TYPE_CONST (base_type), 1, base_type, 0);
}
/* Extract all information from a DW_TAG_string_type DIE and add to
From jtc@redback.com Tue Jan 23 16:30:00 2001
From: jtc@redback.com (J.T. Conklin)
To: gdb-patches@sourceware.cygnus.com
Subject: [PATCH]: memory region attribute nits
Date: Tue, 23 Jan 2001 16:30:00 -0000
Message-id: <5md7dd6bcd.fsf@jtc.redback.com>
X-SW-Source: 2001-01/msg00219.html
Content-length: 2487
It was brought to my attention that today's checkin of memory region
attribute support broke builds on some targets because their memory
transfer functions had not been updated. Many appologies for this
oversight. While I try to build GDB on many architectures, most are
embedded targets.
This change has now been committed.
--jtc
2001-01-23 J.T. Conklin <jtc@redback.com>
* lin-lwp.c (lin_lwp_xfer_memory): Add attrib argument.
* thread-db.c (thread_db_xfer_memory): Likewise.
Index: thread-db.c
===================================================================
RCS file: /cvs/src/src/gdb/thread-db.c,v
retrieving revision 1.3
diff -c -r1.3 thread-db.c
*** thread-db.c 2000/12/27 21:37:57 1.3
--- thread-db.c 2001/01/24 00:25:54
***************
*** 753,758 ****
--- 753,759 ----
static int
thread_db_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+ struct mem_attrib *attrib,
struct target_ops *target)
{
struct cleanup *old_chain = save_inferior_pid ();
***************
*** 768,774 ****
inferior_pid = lwp_from_thread (inferior_pid);
}
! xfer = target_beneath->to_xfer_memory (memaddr, myaddr, len, write, target);
do_cleanups (old_chain);
return xfer;
--- 769,775 ----
inferior_pid = lwp_from_thread (inferior_pid);
}
! xfer = target_beneath->to_xfer_memory (memaddr, myaddr, len, write, attrib, target);
do_cleanups (old_chain);
return xfer;
Index: lin-lwp.c
===================================================================
RCS file: /cvs/src/src/gdb/lin-lwp.c,v
retrieving revision 1.4
diff -c -r1.4 lin-lwp.c
*** lin-lwp.c 2000/12/15 01:01:48 1.4
--- lin-lwp.c 2001/01/24 00:25:56
***************
*** 935,940 ****
--- 935,941 ----
static int
lin_lwp_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len, int write,
+ struct mem_attrib *attrib,
struct target_ops *target)
{
struct cleanup *old_chain = save_inferior_pid ();
***************
*** 943,949 ****
if (is_lwp (inferior_pid))
inferior_pid = GET_LWP (inferior_pid);
! xfer = child_xfer_memory (memaddr, myaddr, len, write, target);
do_cleanups (old_chain);
return xfer;
--- 944,950 ----
if (is_lwp (inferior_pid))
inferior_pid = GET_LWP (inferior_pid);
! xfer = child_xfer_memory (memaddr, myaddr, len, write, attrib, target);
do_cleanups (old_chain);
return xfer;
--
J.T. Conklin
RedBack Networks
From ac131313@cygnus.com Tue Jan 23 19:59:00 2001
From: Andrew Cagney <ac131313@cygnus.com>
To: Gabriel Dos Reis <gdr@codesourcery.com>
Cc: gdb-patches@sources.redhat.com, dosreis@cmla.ens-cachan.fr, bkoz@redhat.com, SID Discussion <sid@sources.redhat.com>
Subject: Re: DejaGnu PATCH to lib/dg.exp: enhance support for "exotic" dir-names
Date: Tue, 23 Jan 2001 19:59:00 -0000
Message-id: <3A6E5292.FF7C054@cygnus.com>
References: <m3snmg5vh7.fsf@merlin.codesourcery.com>
X-SW-Source: 2001-01/msg00220.html
Content-length: 479
GDB's main concern is that any changes made to src/dejagnu don't break
the GDB testsuite. Have you done a before/after run of the GDB
testsuite to confirm that the results don't change? Given you're
playing with file names, someone will probably need to check this on
both unix and cygwin.
Don't forget that anything committed to src/dejagnu and not also sent to
the official maintainer may be lost if the official dejagnu is ever
merged back into this old snapshot.
Andrew
From ac131313@cygnus.com Wed Jan 24 00:00:00 2001
From: Andrew Cagney <ac131313@cygnus.com>
To: jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH]: memory region attribute nits
Date: Wed, 24 Jan 2001 00:00:00 -0000
Message-id: <3A6E8749.2935E8AA@cygnus.com>
References: <5md7dd6bcd.fsf@jtc.redback.com>
X-SW-Source: 2001-01/msg00222.html
Content-length: 977
J.T., A ramble,
As an unofficial guideline, I'd be most worried about the targets I've
listed as buildable in the MAINTAINERS file. If there is a target that
is known to not build then I personally think it is questionable to
expect you to get your changes right for that target.
As an example the SOFTWARE_SINGLE_STEP patch builds for all the targets
listed in MAINTAINERS (it is how I found the sparc64 problem - just got
to test it). As for other targets, I _think_ I got things right.
However, like everyone else, I'm only human and so may well have got
something wrong :-/
In the future, this problem - being able to reliably make global changes
- is likely to become more of an issue. We don't want to let GDB's
development get bogged down because people fear the consequences of
making even simple mechanical changes. Things like -Werror and listing
buildable targets in MAINTAINERS are all part of my secret agenda to
make the process more tractable.
Andrew
From ac131313@cygnus.com Wed Jan 24 00:00:00 2001
From: Andrew Cagney <ac131313@cygnus.com>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: Rudy Folden <rfolden@redhat.com>, gdb-patches@sourceware.cygnus.com
Subject: Re: [RFA] Change malloc to xmalloc
Date: Wed, 24 Jan 2001 00:00:00 -0000
Message-id: <3A6E6872.87E20FC@cygnus.com>
References: <000501c08589$bc0a9dc0$3b1110ac@wirespeed.com> <1010123225905.ZM31728@ocotillo.lan>
X-SW-Source: 2001-01/msg00221.html
Content-length: 828
Kevin Buettner wrote:
> Also, when you change something with PTR in it, just change the ``PTR''
> to ``void *''.
It depends. There are a uses of PTR lurking in GDB where the function
being declared/defined needs to match something in an external header.
Something todo with mmalloc() from memory.
> [...]
> > Index: stuff.c
> > ===================================================================
> > RCS file: /cvs/src/src/gdb/stuff.c,v
> > retrieving revision 1.2
>
> I think you should leave stuff.c alone. It's a stand-alone program
> that doesn't link in utils.c. (Actually, I think stuff.c ought
> to be marked obsolete and eventually deleted.)
Hmm, yes, that has been proposed before (by someone called KevinB? :-).
This should be added to the 5.1 TODO list so that it does actually
happen :-)
enjoy,
Andrew
From ac131313@cygnus.com Wed Jan 24 04:09:00 2001
From: Andrew Cagney <ac131313@cygnus.com>
To: jtc@redback.com
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: [PATCH]: fix netbsd/ns32k target
Date: Wed, 24 Jan 2001 04:09:00 -0000
Message-id: <3A6EA1F9.3B2F7B66@cygnus.com>
References: <5melxvibju.fsf@jtc.redback.com>
X-SW-Source: 2001-01/msg00223.html
Content-length: 2089
"J.T. Conklin" wrote:
>
> I will be committing the enclosed patch. This should fix the problems
> that Andrew encountered while building a ns32k-netbsd GDB on a FreeBSD
> host.
Thanks!
> The first was the FRAME_FIND_SAVED_REGS macro in config/ns32k/tm-umax.h
> mysteriously disappeared in May 1999. As I mentioned last week, there
> was no ChangeLog entry, and because at that time the Cygnus repository
> was the master repository, I am unable to determine in what change this
> occured. But since neither the umax nor any target that inherits from
> it (like netbsd/ns32k) can build without it, I can only assume that it's
> removal was inadvertant. This patch restores the value to what it was
> before.
You can be fairly sure it was me that made the change, I'll dig up the
details when I've more bandwith available (I'm moving hemispheres). It
would have occured during one of the multi-arch passes and yes it should
have had a ChangeLog entry so must have slipped through :-(
One thing I remember though. Right at the start of the multi-arch
process I made a list of targets I could build. Even at the start I
couldn't find a buildable ns32k target. My notes read:
ns32k-netbsd native solib.c:37: a.out.h: No such file or directory
ns32k-pc532-mach3 native nm-m3.h:24: mach.h: No such file or directory
so even before I broke it, it was already broken :-(
> The other was that I jumped the gun and moved shared library support
> objects from NATDEPFILES to TDEPFILES for all NetBSD targets after
> the same had been done for GNU/Linux targets. This turned out to be
> a mistake. Since shared library support has not yet been made host
> independent, it was impossible to build cross debuggers for NetBSD
> targets on some hosts.
I've a feeling that you weren't the only one. Unless the host
dependency in the shared library code is fixed (that #include <link.h>
and its consequenses) a few other *-elf targets will also need to revert
that change.
Thanks again for fixing that target. Don't forget to update
MAINTAINERS to indicate that it does build.
Andrew
From aoliva@redhat.com Wed Jan 24 05:16:00 2001
From: Alexandre Oliva <aoliva@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: SH sim: implemented time() syscall
Date: Wed, 24 Jan 2001 05:16:00 -0000
Message-id: <or66j5ozt9.fsf@guarana.lsd.ic.unicamp.br>
X-SW-Source: 2001-01/msg00224.html
Content-length: 49
I'm checking this in, approved by Ben Elliston.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2001-01-23 14:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-23 14:25 [RFA] Change malloc to xmalloc Rudy Folden
2001-01-23 14:59 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox