* Re: How to configure a cross gdb to debug natively [not found] <20010713132346.A28020@lucon.org> @ 2001-07-13 13:48 ` H . J . Lu 2001-07-13 14:06 ` Alexandre Oliva 2001-07-13 14:08 ` Daniel Jacobowitz 0 siblings, 2 replies; 5+ messages in thread From: H . J . Lu @ 2001-07-13 13:48 UTC (permalink / raw) To: GDB; +Cc: gdb-patches On Fri, Jul 13, 2001 at 01:23:46PM -0700, H . J . Lu wrote: > I'd like to configure gdb inside a tree with binutils, gcc and gdb > on Linux/i686 with > > # ../configure --target=i386-linux .... > > I do that on purpose so that gcc and binutils won't use any files > on the host machine. But gdb refuses to debug natively on Linux/i686 > since it is configured as a cross gdb, However, Linux/i686 is > compatible with i386-linux, how can I convince gdb to debug natively? > This patch seems to do the trick for me. H.J. ---- 2001-07-13 H.J. Lu (hjl@gnu.org) * configure.in: Check "${target_os}" = "${host_os}" and "${gdb_target_cpu}" = "${gdb_host_cpu}" for native files instead of "${target}" = "${host}". * configure: Regenerated. --- gdb/configure.in.arch Fri Jul 13 12:12:33 2001 +++ gdb/configure.in Fri Jul 13 13:36:15 2001 @@ -1183,7 +1183,7 @@ s/GDB_MULTI_ARCH[ ]*=[ ]*\([^ ]*\)[ # these really aren't orthogonal true/false values of the same condition, # but shells are slow enough that I like to reuse the test conditions # whenever possible -if test "${target}" = "${host}"; then +if test "${target_os}" = "${host_os}" -a "${gdb_target_cpu}" = "${gdb_host_cpu}"; then nativefile=`sed -n ' s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p ' ${host_makefile_frag}` ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to configure a cross gdb to debug natively 2001-07-13 13:48 ` How to configure a cross gdb to debug natively H . J . Lu @ 2001-07-13 14:06 ` Alexandre Oliva 2001-07-13 14:08 ` Daniel Jacobowitz 1 sibling, 0 replies; 5+ messages in thread From: Alexandre Oliva @ 2001-07-13 14:06 UTC (permalink / raw) To: H . J . Lu; +Cc: GDB, gdb-patches On Jul 13, 2001, "H . J . Lu" <hjl@lucon.org> wrote: > -if test "${target}" = "${host}"; then > +if test "${target_os}" = "${host_os}" -a "${gdb_target_cpu}" = "${gdb_host_cpu}"; then Please use `test ... && test ...' instead of `test ... -a ...'. The latter is not as portable. -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{cygnus.com, redhat.com} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist *Please* write to mailing lists, not to me ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to configure a cross gdb to debug natively 2001-07-13 13:48 ` How to configure a cross gdb to debug natively H . J . Lu 2001-07-13 14:06 ` Alexandre Oliva @ 2001-07-13 14:08 ` Daniel Jacobowitz 2001-07-13 14:12 ` H . J . Lu 2001-07-13 15:15 ` Andrew Cagney 1 sibling, 2 replies; 5+ messages in thread From: Daniel Jacobowitz @ 2001-07-13 14:08 UTC (permalink / raw) To: H . J . Lu; +Cc: GDB, gdb-patches On Fri, Jul 13, 2001 at 01:48:06PM -0700, H . J . Lu wrote: > On Fri, Jul 13, 2001 at 01:23:46PM -0700, H . J . Lu wrote: > > I'd like to configure gdb inside a tree with binutils, gcc and gdb > > on Linux/i686 with > > > > # ../configure --target=i386-linux .... > > > > I do that on purpose so that gcc and binutils won't use any files > > on the host machine. But gdb refuses to debug natively on Linux/i686 > > since it is configured as a cross gdb, However, Linux/i686 is > > compatible with i386-linux, how can I convince gdb to debug natively? > > > > This patch seems to do the trick for me. > > > H.J. > ---- > 2001-07-13 H.J. Lu (hjl@gnu.org) > > * configure.in: Check "${target_os}" = "${host_os}" and > "${gdb_target_cpu}" = "${gdb_host_cpu}" for native files > instead of "${target}" = "${host}". > * configure: Regenerated. I don't think this is generally appropriate. For one thing, it further breaks the consistency of cross-compiling. If I have ${host} != ${target} then I am definitely building a cross debugger and that's what I expect to get out. Why not build your tools --host=i386-linux instead? -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to configure a cross gdb to debug natively 2001-07-13 14:08 ` Daniel Jacobowitz @ 2001-07-13 14:12 ` H . J . Lu 2001-07-13 15:15 ` Andrew Cagney 1 sibling, 0 replies; 5+ messages in thread From: H . J . Lu @ 2001-07-13 14:12 UTC (permalink / raw) To: GDB, gdb-patches On Fri, Jul 13, 2001 at 02:08:26PM -0700, Daniel Jacobowitz wrote: > On Fri, Jul 13, 2001 at 01:48:06PM -0700, H . J . Lu wrote: > > On Fri, Jul 13, 2001 at 01:23:46PM -0700, H . J . Lu wrote: > > > I'd like to configure gdb inside a tree with binutils, gcc and gdb > > > on Linux/i686 with > > > > > > # ../configure --target=i386-linux .... > > > > > > I do that on purpose so that gcc and binutils won't use any files > > > on the host machine. But gdb refuses to debug natively on Linux/i686 > > > since it is configured as a cross gdb, However, Linux/i686 is > > > compatible with i386-linux, how can I convince gdb to debug natively? > > > > > > > This patch seems to do the trick for me. > > > > > > H.J. > > ---- > > 2001-07-13 H.J. Lu (hjl@gnu.org) > > > > * configure.in: Check "${target_os}" = "${host_os}" and > > "${gdb_target_cpu}" = "${gdb_host_cpu}" for native files > > instead of "${target}" = "${host}". > > * configure: Regenerated. > > I don't think this is generally appropriate. For one thing, it further > breaks the consistency of cross-compiling. If I have ${host} != > ${target} then I am definitely building a cross debugger and that's I thought the only difference between the native debugger and the cross debugger was you couldn't debug natibely with the cross debugger, but you could use the native debugger to debug in a cross environment. > what I expect to get out. Why not build your tools --host=i386-linux > instead? As I said, gdb is the part of my tool source tree. I don't want to use --host=i386-linux so that gcc and bintils won't use any header files and libraries on the host machine. H.J. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to configure a cross gdb to debug natively 2001-07-13 14:08 ` Daniel Jacobowitz 2001-07-13 14:12 ` H . J . Lu @ 2001-07-13 15:15 ` Andrew Cagney 1 sibling, 0 replies; 5+ messages in thread From: Andrew Cagney @ 2001-07-13 15:15 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: H . J . Lu, GDB, gdb-patches > On Fri, Jul 13, 2001 at 01:48:06PM -0700, H . J . Lu wrote: > >> On Fri, Jul 13, 2001 at 01:23:46PM -0700, H . J . Lu wrote: > >> > I'd like to configure gdb inside a tree with binutils, gcc and gdb >> > on Linux/i686 with >> > >> > # ../configure --target=i386-linux .... >> > >> > I do that on purpose so that gcc and binutils won't use any files >> > on the host machine. But gdb refuses to debug natively on Linux/i686 >> > since it is configured as a cross gdb, However, Linux/i686 is >> > compatible with i386-linux, how can I convince gdb to debug natively? >> > > I don't think this is generally appropriate. For one thing, it further > breaks the consistency of cross-compiling. If I have ${host} != > ${target} then I am definitely building a cross debugger and that's > what I expect to get out. Why not build your tools --host=i386-linux > instead? Yes. H.J., you need to canadian cross GDB using the cross-GCC and cross-BINUTILS you just built. Andrew ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2001-07-13 15:15 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20010713132346.A28020@lucon.org>
2001-07-13 13:48 ` How to configure a cross gdb to debug natively H . J . Lu
2001-07-13 14:06 ` Alexandre Oliva
2001-07-13 14:08 ` Daniel Jacobowitz
2001-07-13 14:12 ` H . J . Lu
2001-07-13 15:15 ` Andrew Cagney
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox