* xcoffread.c (arrange_linetable): Use x{m,re}alloc not {m,re}alloc.
This commit is contained in:
parent
3021c40d20
commit
ecfd2b6091
2 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
Wed Mar 17 09:46:31 1993 Jim Kingdon (kingdon@cygnus.com)
|
||||||
|
|
||||||
|
* xcoffread.c (arrange_linetable): Use x{m,re}alloc not {m,re}alloc.
|
||||||
|
|
||||||
Wed Mar 17 11:28:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
Wed Mar 17 11:28:11 1993 Steve Chamberlain (sac@thepub.cygnus.com)
|
||||||
|
|
||||||
* z8k-tdep.c (extract_return_value, write_return_value,
|
* z8k-tdep.c (extract_return_value, write_return_value,
|
||||||
|
|
|
@ -368,7 +368,7 @@ arrange_linetable (oldLineTb)
|
||||||
|
|
||||||
fentry_size = NUM_OF_FUNCTIONS;
|
fentry_size = NUM_OF_FUNCTIONS;
|
||||||
fentry = (struct linetable_entry*)
|
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) {
|
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. */
|
if (function_count >= fentry_size) { /* make sure you have room. */
|
||||||
fentry_size *= 2;
|
fentry_size *= 2;
|
||||||
fentry = (struct linetable_entry*)
|
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].line = ii;
|
||||||
fentry[function_count].pc = oldLineTb->item[ii].pc;
|
fentry[function_count].pc = oldLineTb->item[ii].pc;
|
||||||
|
@ -393,7 +393,9 @@ arrange_linetable (oldLineTb)
|
||||||
qsort (fentry, function_count, sizeof(struct linetable_entry), compare_lte);
|
qsort (fentry, function_count, sizeof(struct linetable_entry), compare_lte);
|
||||||
|
|
||||||
/* allocate a new line table. */
|
/* allocate a new line table. */
|
||||||
newLineTb = (struct linetable*) malloc (sizeof (struct linetable) +
|
newLineTb = (struct linetable *)
|
||||||
|
xmalloc
|
||||||
|
(sizeof (struct linetable) +
|
||||||
(oldLineTb->nitems - function_count) * sizeof (struct linetable_entry));
|
(oldLineTb->nitems - function_count) * sizeof (struct linetable_entry));
|
||||||
|
|
||||||
/* if line table does not start with a function beginning, copy up until
|
/* if line table does not start with a function beginning, copy up until
|
||||||
|
|
Loading…
Add table
Reference in a new issue