aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-03-17 20:38:38 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-03-17 20:38:38 +0000
commitecfd2b60912fce105a6c9cc26ace0e55cd6dd235 (patch)
tree199335841a1a680bb10f5ebf449c7bca3a9bbba6 /gdb/xcoffread.c
parent3021c40d20c93f591f912f1b3ba55809735d49fb (diff)
downloadgdb-ecfd2b60912fce105a6c9cc26ace0e55cd6dd235.zip
gdb-ecfd2b60912fce105a6c9cc26ace0e55cd6dd235.tar.gz
gdb-ecfd2b60912fce105a6c9cc26ace0e55cd6dd235.tar.bz2
* xcoffread.c (arrange_linetable): Use x{m,re}alloc not {m,re}alloc.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index cbc2f73..c20a92e 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -368,7 +368,7 @@ arrange_linetable (oldLineTb)
fentry_size = NUM_OF_FUNCTIONS;
fentry = (struct linetable_entry*)
- malloc (fentry_size * sizeof (struct linetable_entry));
+ xmalloc (fentry_size * sizeof (struct linetable_entry));
for (function_count=0, ii=0; ii <oldLineTb->nitems; ++ii) {
@@ -377,7 +377,7 @@ arrange_linetable (oldLineTb)
if (function_count >= fentry_size) { /* make sure you have room. */
fentry_size *= 2;
fentry = (struct linetable_entry*)
- realloc (fentry, fentry_size * sizeof (struct linetable_entry));
+ xrealloc (fentry, fentry_size * sizeof (struct linetable_entry));
}
fentry[function_count].line = ii;
fentry[function_count].pc = oldLineTb->item[ii].pc;
@@ -393,8 +393,10 @@ arrange_linetable (oldLineTb)
qsort (fentry, function_count, sizeof(struct linetable_entry), compare_lte);
/* allocate a new line table. */
- newLineTb = (struct linetable*) malloc (sizeof (struct linetable) +
- (oldLineTb->nitems - function_count) * sizeof (struct linetable_entry));
+ newLineTb = (struct linetable *)
+ xmalloc
+ (sizeof (struct linetable) +
+ (oldLineTb->nitems - function_count) * sizeof (struct linetable_entry));
/* if line table does not start with a function beginning, copy up until
a function begin. */