>Could you post what you did to the gdb_string.h file to get the thing to
>compile under rh6.1? I wasn't able to figure it out. (new to c and linux)
1.At the end of "gdb_string.h" there is a line that reads
extern char *strdup();
Comment this out so that it reads
// extern char *strdup();
2.Make sure you apply the patch to the file "gdb-4.18/gdb/Makefile.in"
basically this changes the build so that instead of using the mmalloc that
comes with the gdb distribution it uses the mmalloc local to your system.
--- gdb-4.16/gdb/Makefile.in.ewt Tue Aug 19 12:08:58 1997
+++ gdb-4.16/gdb/Makefile.in Tue Aug 19 12:15:52 1997
@@ -90,14 +90,14 @@
# Where is the MMALLOC library? Typically in ../mmalloc.
# Note that mmalloc can still be used on systems without mmap().
# To use your system malloc, comment out the following defines.
-MMALLOC_DIR = ../mmalloc
-MMALLOC_SRC = $(srcdir)/$(MMALLOC_DIR)
-MMALLOC = $(MMALLOC_DIR)/libmmalloc.a
+#MMALLOC_DIR = ../mmalloc
+#MMALLOC_SRC = $(srcdir)/$(MMALLOC_DIR)
+#MMALLOC = $(MMALLOC_DIR)/libmmalloc.a
# To use your system malloc, uncomment MMALLOC_DISABLE.
-#MMALLOC_DISABLE = -DNO_MMALLOC
+MMALLOC_DISABLE = -DNO_MMALLOC
# To use mmalloc but disable corruption checking, uncomment MMALLOC_CHECK
#MMALLOC_CHECK = -DNO_MMALLOC_CHECK
-MMALLOC_CFLAGS = -I$(MMALLOC_SRC) $(MMALLOC_CHECK) $(MMALLOC_DISABLE)
+MMALLOC_CFLAGS = $(MMALLOC_CHECK) $(MMALLOC_DISABLE)
# Where is the BFD library? Typically in ../bfd.
BFD_DIR = ../bfd
3. Run configure as follows in the directory gdb-4.18:
./configure --target=m68k-palmos-coff i586-linux
4. Run make as follows:
make
5. Assuming all goes well there will now be an executable "gdb" in
gdb-4.18/gdb, be careful not to overwrite the existing gdb (which you may or
may not have installed, perhaps rename the file to m68k-palmos-coff-gdb with
the following:
mv gdb m68k-palmos-coff-gdb
6. Finally copy your newly renamed executable to somewhere in your $PATH, I
put mine in "/usr/local/bin".
cp m68k-palmos-coff-gdb /usr/local/bin
7.The following is from a previous post on how to debug using gdb.
- Build your app. Be sure to link with -g.
- Start Poser.
- Load your app into Poser.
- Start gdb.
- Type "target pilot localhost:2000" to gdb.
- Start your app on Pose.
- Wait for gdb to see the initial breakpoint and prompt you.
- Start debugging.
Note that you no longer need to use gdbpanel or gdbplug if you were using
those with earlier versions of Poser, Copilot, or xcopilot.
8. Note that the hardwired port 2000 is not anymore. Configure which port
you want to attach pose to in ~/.poserc and target gdb accordingly.
9. Happy debugging.