This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Apple's MI changes


As Samantha promised, we are looking at Apple's contributed
ftp://sources.redhat.com/pub/gdb/contrib/apple/apple-puma-branch.tar.bz2
to see how well we think its design matches our MI needs in Eclipse.
Step one was to hack it to run native on x86 RedHat 7.1.
Here are the instructions in case anyone wants to duplicate this for
their own evaluation.

For the record, the patch below is not intended as a submission to
the gdb codebase, and the FSF paperwork is not in place to enable that.
We will ensure it is before we submit real patches.

Here's what you do:

1. Untar Apple's code
2. Find a src/ltcf-c.sh from some other gdb source distribution, it is
missing in this one.
3. Apply the patch
4. ./configure --enable-gdbmi ; make


Brian Thomson
IBM


diff -ur --exclude=*.o src_orig/electric-fence/print.c src/electric-fence/print.c
--- src_orig/electric-fence/print.c      Thu Mar 16 15:39:32 2000
+++ src/electric-fence/print.c     Thu Apr 25 14:00:22 2002
@@ -101,7 +101,8 @@
                    break;
               case 'c':
                    {
-                        char c = va_arg(args, char);
+                   /*   char c = va_arg(args, char); BWT */
+                        char c = va_arg(args, int);

                         (void) write(2, &c, 1);
                    }
diff -ur --exclude=*.o src_orig/gdb/Makefile.in src/gdb/Makefile.in
--- src_orig/gdb/Makefile.in  Fri Jun 15 20:43:01 2001
+++ src/gdb/Makefile.in  Thu Apr 25 14:40:42 2002
@@ -631,6 +631,8 @@
     $(POSSLIBS)
 TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)

+#   dbxread.o coffread.o elfread.o machoread.o symread.o pefread.o  BWT
+
 COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \
     source.o values.o eval.o valops.o valarith.o valprint.o printcmd.o \
     symtab.o symfile.o symmisc.o linespec.o infcmd.o infrun.o command.o \
@@ -641,7 +643,7 @@
     kod.o kod-cisco.o \
     gdb-events.o \
     exec.o bcache.o objfiles.o minsyms.o maint.o demangle.o \
-    dbxread.o coffread.o elfread.o machoread.o symread.o pefread.o \
+    dbxread.o coffread.o elfread.o symread.o pefread.o \
     dwarfread.o dwarf2read.o mipsread.o stabsread.o corefile.o \
     c-lang.o objc-lang.o ch-exp.o ch-lang.o f-lang.o \
     ui-out.o cli-out.o interpreter.o \
diff -ur --exclude=*.o src_orig/gdb/corelow.c src/gdb/corelow.c
--- src_orig/gdb/corelow.c    Mon Nov 20 17:07:56 2000
+++ src/gdb/corelow.c    Thu Apr 25 13:55:54 2002
@@ -165,10 +165,10 @@
     {
       if (cf->check_format (abfd))
     {
-      return (true);
+      return 1; /* (true); BWT */
     }
     }
-  return (false);
+  return 0; /* (false); BWT */
 }

 /* Discard all vestiges of any previous core file and mark data and stack
diff -ur --exclude=*.o src_orig/gdb/defs.h src/gdb/defs.h
--- src_orig/gdb/defs.h  Fri Jun 22 15:47:40 2001
+++ src/gdb/defs.h  Thu Apr 25 16:48:16 2002
@@ -390,6 +390,7 @@
 extern PTR mmalloc (PTR, size_t);
 extern PTR mrealloc (PTR, PTR, size_t);
 extern void mfree (PTR, PTR);
+#define mfree(a,b) xmfree(a,b)          /* BWT */
 #endif

 extern void init_page_info (void);
diff -ur --exclude=*.o src_orig/gdb/event-loop.c src/gdb/event-loop.c
--- src_orig/gdb/event-loop.c Mon Aug  6 22:17:50 2001
+++ src/gdb/event-loop.c Wed May  1 13:30:04 2002
@@ -672,7 +672,8 @@
     }
       free (gdb_notifier.poll_fds);
       gdb_notifier.poll_fds = new_poll_fds;
-      gdb_notifier.num_fds--;
+/*      gdb_notifier.num_fds--;  BWT */
+    gdb_notifier.num_fds = j;
 #else
       internal_error ("event-loop.c : use_poll without HAVE_POLL");
 #endif /* HAVE_POLL */
diff -ur --exclude=*.o src_orig/gdb/exec.c src/gdb/exec.c
--- src_orig/gdb/exec.c  Wed Jul 11 16:29:43 2001
+++ src/gdb/exec.c  Wed May  1 12:34:59 2002
@@ -832,7 +832,7 @@
   exec_ops.to_can_async_p = standard_can_async_p;
   exec_ops.to_is_async_p = standard_is_async_p;
   exec_ops.to_async = standard_async;
-  exec_ops.to_async_mask_value = 1;
+  exec_ops.to_async_mask_value = 0;  /* BWT */
 }

 void
diff -ur --exclude=*.o src_orig/gdb/infrun.c src/gdb/infrun.c
--- src_orig/gdb/infrun.c     Mon Oct 22 16:13:13 2001
+++ src/gdb/infrun.c     Thu Apr 25 11:30:06 2002
@@ -2541,7 +2541,8 @@
          */
          int was_sync_execution = sync_execution;
          target_terminal_ours_for_output ();
-         solib_changed = SOLIB_ADD (NULL, 0, NULL);
+         SOLIB_ADD (NULL, 0, NULL); solib_changed = 1;
+    /*   solib_changed = SOLIB_ADD (NULL, 0, NULL); BWT */
          if (was_sync_execution && !sync_execution)
            {
              async_disable_stdin();
diff -ur --exclude=*.o src_orig/gdb/mi/mi-main.c src/gdb/mi/mi-main.c
--- src_orig/gdb/mi/mi-main.c Tue Aug 14 19:58:27 2001
+++ src/gdb/mi/mi-main.c Thu Apr 25 14:14:34 2002
@@ -253,8 +253,9 @@
   else
     {
       /* a PB specific solution... */
-      extern int pb_gdb_util_inferior_pid();
-      int pid = pb_gdb_util_inferior_pid();
+    /*  extern int pb_gdb_util_inferior_pid();
+      int pid = pb_gdb_util_inferior_pid(); BWT */
+      int pid = 0;
       if (pid > 0) {
        /* fprintf(stderr, "about to kill %d\n", pid); */
         kill (pid, SIGINT);
diff -ur --exclude=*.o src_orig/gdb/solib.c src/gdb/solib.c
--- src_orig/gdb/solib.c Mon Nov 20 17:08:01 2000
+++ src/gdb/solib.c Thu Apr 25 13:54:26 2002
@@ -156,7 +156,7 @@
     }
   /* Leave bfd open, core_xfer_memory and "info files" need it.  */
   so->abfd = abfd;
-  abfd->cacheable = true;
+  abfd->cacheable = 1; /* true;  BWT */

   /* copy full path name into so_name, so that later symbol_file_add can find
      it */
@@ -258,7 +258,7 @@
                                                     so->sections_end);

   so->objfile = symbol_file_add (so->so_name, so->from_tty,
-                    sap, 0, OBJF_SHARED, 0, NULL);
+                    sap, 0, OBJF_SHARED, 0, 0, 0); /* BWT */
   free_section_addr_info (sap);

   return (1);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]