Move gdb's xmalloc and friends to new file
When "common" becomes a library, linking will cause a symbol clash, because "xmalloc" and some related symbols are defined in that library, libiberty, and readline. To work around this problem, this patch moves the clashing symbols to a new file, which is then compiled separately for both gdb and gdbserver. gdb/ChangeLog 2019-06-11 Tom Tromey <tom@tromey.com> * common/common-utils.c (xmalloc, xrealloc, xcalloc) (xmalloc_failed): Move to alloc.c. * alloc.c: New file. * Makefile.in (COMMON_SFILES): Add alloc.c. gdb/gdbserver/ChangeLog 2019-06-11 Tom Tromey <tom@tromey.com> * Makefile.in (SFILES): Add alloc.c. (OBS): Add alloc.o. (IPA_OBJS): Add alloc-ipa.o. (alloc-ipa.o): New target. (%.o: ../%.c): New pattern rule.
Showing
- gdb/ChangeLog 7 additions, 0 deletionsgdb/ChangeLog
- gdb/Makefile.in 1 addition, 0 deletionsgdb/Makefile.in
- gdb/alloc.c 111 additions, 0 deletionsgdb/alloc.c
- gdb/common/common-utils.c 0 additions, 72 deletionsgdb/common/common-utils.c
- gdb/gdbserver/ChangeLog 8 additions, 0 deletionsgdb/gdbserver/ChangeLog
- gdb/gdbserver/Makefile.in 11 additions, 0 deletionsgdb/gdbserver/Makefile.in
Loading
Please register or sign in to comment