diff options
author | Tom Tromey <tromey@redhat.com> | 2014-01-16 21:41:58 -0700 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2014-02-12 09:59:13 -0700 |
commit | 01fd3ea573324b8248efbb236d994420641e3d32 (patch) | |
tree | 298d7b46c13980609cae1694319cb37395d0fe8e /gdb/Makefile.in | |
parent | 9fb5010805bdfe0eb8fc5db01e7f4c93b04c8f29 (diff) | |
download | binutils-gdb-01fd3ea573324b8248efbb236d994420641e3d32.tar.gz |
share "cell" code
The "cell"-based printing code, like phex, was duplicated in both gdb
and gdbserver. This patch merges the two implementations into a new
file in common/.
2014-02-12 Tom Tromey <tromey@redhat.com>
* utils.h: Include print-utils.h.
(host_address_to_string, plongest, pulongest, phex, phex_nz)
(int_string, core_addr_to_string, core_addr_to_string_nz)
(hex_string, hex_string_custom): Don't declare.
* utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
(plongest, thirty_two, phex, phex_nz, octal2str, hex_string)
(hex_string_custom, int_string, core_addr_to_string)
(core_addr_to_string_nz, host_address_to_string): Move to
common/print-utils.c.
* common/print-utils.h: New file.
* common/print-utils.c: New file
* Makefile.in (SFILES): Add common/print-utils.c.
(HFILES_NO_SRCDIR): Add common/print-utils.h.
(COMMON_OBS): Add print-utils.o.
(print-utils.o): New target.
2014-02-12 Tom Tromey <tromey@redhat.com>
* utils.h (pulongest, plongest, phex_nz): Don't declare.
Include print-utils.h.
* utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
(plongest, thirty_two, phex_nz): Remove.
* Makefile.in (SFILES): Add common/print-utils.c.
(OBS): Add print-utils.o.
(print-utils-ipa.o): New target.
(print-utils.o): New target.
(IPA_OBJS): Add print-utils-ipa.o.
Diffstat (limited to 'gdb/Makefile.in')
-rw-r--r-- | gdb/Makefile.in | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/gdb/Makefile.in b/gdb/Makefile.in index 6c8db6ff302..21124f1ef79 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -839,7 +839,7 @@ SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \ common/gdb_vecs.c common/common-utils.c common/xml-utils.c \ common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \ common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \ - target/waitstatus.c + target/waitstatus.c common/print-utils.c LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c @@ -921,7 +921,8 @@ common/format.h common/host-defs.h utils.h common/queue.h \ common/linux-osdata.h gdb-dlfcn.h auto-load.h probe.h stap-probe.h \ gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h common/linux-btrace.h \ ctf.h common/i386-cpuid.h common/i386-gcc-cpuid.h target/resume.h \ -target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h +target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \ +common/print-utils.h # Header files that already have srcdir in them, or which are in objdir. @@ -1019,7 +1020,8 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \ inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o \ gdb_vecs.o jit.o progspace.o skip.o probe.o \ common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \ - format.o registry.o btrace.o record-btrace.o waitstatus.o + format.o registry.o btrace.o record-btrace.o waitstatus.o \ + print-utils.o TSOBS = inflow.o @@ -2140,6 +2142,10 @@ mips-linux-watch.o: ${srcdir}/common/mips-linux-watch.c $(COMPILE) $(srcdir)/common/mips-linux-watch.c $(POSTCOMPILE) +print-utils.o: ${srcdir}/common/print-utils.c + $(COMPILE) $(srcdir)/common/print-utils.c + $(POSTCOMPILE) + # # gdb/target/ dependencies # |