From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Snyder To: jtc@redback.com Cc: gdb-patches@sources.redhat.com, cagney@redhat.com, kevinb@redhat.com, hunt@redhat.com Subject: Re: [RFA] Link remote target with svr4 solibs. Date: Tue, 17 Apr 2001 13:29:00 -0000 Message-id: <3ADCA7AD.F6F2ED59@cygnus.com> References: <3AAD635C.DAE5D340@cygnus.com> <5m1ys2cxxt.fsf@jtc.redback.com> <3AAD6D7D.77A18268@cygnus.com> <3AAE36DF.93561D43@cygnus.com> <5mu24xfpf9.fsf@jtc.redback.com> X-SW-Source: 2001-04/msg00175.html "J.T. Conklin" wrote: > > >>>>> "Andrew" == Andrew Cagney writes: > Andrew> Assuming ok with J.T. as well, can you add it to those functions along > Andrew> with a FIXME. Plenty of other examples can already be found. > > I was going to mention this yesterday as well. I don't want to be > unreasonable and make you fix the problems with the _open vector, but > I do want the code marked so once that is fixed it can be migrated to > the proper place. So as long as you add a FIXME, the change is OK by > me. > > --jtc After a long delay, I'm finally checking in this change. I'll append the change again here to save anyone interested from rooting thru the archive. 2001-04-17 Michael Snyder * remote.c (remote_open_1): On opening the remote target, activate the solib_create_inferior_hook, so that it can detect when the target loads shared libraries. (remote_async_open_1): Ditto. Index: remote.c =================================================================== RCS file: /cvs/src/src/gdb/remote.c,v retrieving revision 1.44 diff -c -3 -p -r1.44 remote.c *** remote.c 2001/04/03 01:42:17 1.44 --- remote.c 2001/04/17 20:28:51 *************** *** 50,55 **** --- 50,57 ---- #include #include "serial.h" + #include "gdbcore.h" /* for exec_bfd */ + /* Prototypes for local functions */ static void cleanup_sigint_signal_handler (void *dummy); static void initialize_sigint_signal_handler (void); *************** serial device is attached to the remote *** 2148,2158 **** if (extended_p) { ! /* tell the remote that we're using the extended protocol. */ char *buf = alloca (PBUFSIZ); putpkt ("!"); getpkt (buf, PBUFSIZ, 0); } } /* Just like remote_open but with asynchronous support. */ --- 2150,2169 ---- if (extended_p) { ! /* Tell the remote that we are using the extended protocol. */ char *buf = alloca (PBUFSIZ); putpkt ("!"); getpkt (buf, PBUFSIZ, 0); } + /* FIXME: need a master target_open vector from which all + remote_opens can be called, so that stuff like this can + go there. Failing that, the following code must be copied + to the open function for any remote target that wants to + support svr4 shared libraries. */ + #ifdef SOLIB_CREATE_INFERIOR_HOOK + if (exec_bfd) /* No use without an exec file. */ + SOLIB_CREATE_INFERIOR_HOOK (inferior_pid); + #endif } /* Just like remote_open but with asynchronous support. */ *************** serial device is attached to the remote *** 2242,2252 **** if (extended_p) { ! /* tell the remote that we're using the extended protocol. */ char *buf = alloca (PBUFSIZ); putpkt ("!"); getpkt (buf, PBUFSIZ, 0); } } /* This takes a program previously attached to and detaches it. After --- 2253,2272 ---- if (extended_p) { ! /* Tell the remote that we are using the extended protocol. */ char *buf = alloca (PBUFSIZ); putpkt ("!"); getpkt (buf, PBUFSIZ, 0); } + /* FIXME: need a master target_open vector from which all + remote_opens can be called, so that stuff like this can + go there. Failing that, the following code must be copied + to the open function for any remote target that wants to + support svr4 shared libraries. */ + #ifdef SOLIB_CREATE_INFERIOR_HOOK + if (exec_bfd) /* No use without an exec file. */ + SOLIB_CREATE_INFERIOR_HOOK (inferior_pid); + #endif } /* This takes a program previously attached to and detaches it. After >From msnyder@cygnus.com Tue Apr 17 13:30:00 2001 From: Michael Snyder To: gdb-patches@sources.redhat.com Subject: Re: [RFA] info breakpoints: handle 64-bit addresses Date: Tue, 17 Apr 2001 13:30:00 -0000 Message-id: <3ADCA523.D140103D@cygnus.com> References: <3AB0235F.FB3710FD@cygnus.com> X-SW-Source: 2001-04/msg00176.html Content-length: 4013 Michael Snyder wrote: > > I know I'm the maintainer, but I'm gonna ask for approval anyway, > to make sure I haven't violated either portability or aesthetic standards. Committed (with the change suggested by Ed Satterthwaite). > > ---------------------------------------------------------------------------------------------------- > 2001-03-14 Michael Snyder > > * breakpoint.c (print_one_breakpoint): Handle 64-bit addresses. > > Index: breakpoint.c > =================================================================== > RCS file: /cvs/src/src/gdb/breakpoint.c,v > retrieving revision 1.27 > diff -c -3 -p -r1.27 breakpoint.c > *** breakpoint.c 2001/03/06 08:21:05 1.27 > --- breakpoint.c 2001/03/15 02:15:37 > *************** print_one_breakpoint (struct breakpoint > *** 3156,3162 **** > /* 5 and 6 */ > strcpy (wrap_indent, " "); > if (addressprint) > ! strcat (wrap_indent, " "); > switch (b->type) > { > case bp_none: > --- 3156,3167 ---- > /* 5 and 6 */ > strcpy (wrap_indent, " "); > if (addressprint) > ! { > ! if (TARGET_ADDR_BIT <= 32) > ! strcat (wrap_indent, " "); > ! else > ! strcat (wrap_indent, " "); > ! } > switch (b->type) > { > case bp_none: > *************** print_one_breakpoint (struct breakpoint > *** 3330,3341 **** > #else > if (addressprint) > { > annotate_field (4); > ! /* FIXME-32x64: need a print_address_numeric with > ! field width */ > ! printf_filtered ("%s ", > ! local_hex_string_custom > ! ((unsigned long) b->address, "08l")); > } > annotate_field (5); > *last_addr = b->address; > --- 3335,3350 ---- > #else > if (addressprint) > { > + char *tmp; > + > annotate_field (4); > ! > ! if (TARGET_ADDR_BIT <= 32) > ! tmp = longest_local_hex_string_custom (b->address, "08l"); > ! else > ! tmp = longest_local_hex_string_custom (b->address, "016l"); > ! > ! printf_filtered ("%s ", tmp); > } > annotate_field (5); > *last_addr = b->address; > *************** breakpoint_1 (int bnum, int allflag) > *** 3570,3576 **** > if (addressprint) > { > annotate_field (4); > ! ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */ > } > annotate_field (5); > ui_out_table_header (uiout, 40, ui_noalign, "What"); /* 6 */ > --- 3579,3588 ---- > if (addressprint) > { > annotate_field (4); > ! if (TARGET_ADDR_BIT <= 32) > ! ui_out_table_header (uiout, 10, ui_left, "Address"); /* 5 */ > ! else > ! ui_out_table_header (uiout, 18, ui_left, "Address"); /* 5 */ > } > annotate_field (5); > ui_out_table_header (uiout, 40, ui_noalign, "What"); /* 6 */ > *************** breakpoint_1 (int bnum, int allflag) > *** 3587,3593 **** > if (addressprint) > { > annotate_field (4); > ! printf_filtered ("Address "); > } > annotate_field (5); > printf_filtered ("What\n"); > --- 3599,3608 ---- > if (addressprint) > { > annotate_field (4); > ! if (TARGET_ADDR_BIT <= 32) > ! printf_filtered ("Address "); > ! else > ! printf_filtered ("Address "); > } > annotate_field (5); > printf_filtered ("What\n");