This is the mail archive of the gdb-prs@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]

gdb/385: gdbserver isn't built? (FAQ)



>Number:         385
>Category:       gdb
>Synopsis:       gdbserver isn't built? (FAQ)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 28 13:28:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     ac131313@redhat.com
>Release:        unknown-1.0
>Organization:
>Environment:

>Description:
This is a dummy bug report until the documentation is reviewed.

People often find that, unexpectedly, gdbserver isn't built for their target even though GDB claims that it is supported.  Hopefully this bug report helps.

(It is a bug report to catch peoples attention.)
>How-To-Repeat:
Some definitions:

host: the system that GDB is to run on
target: the system that GDB is to debug
build: the system that GDB is being compiled on

These three lead to a number of combinations.  To make it real, I'll use cygwin and GNU/Linux and BSD in the below.

host=GNU/Linux target=GNU/Linux build=GNU/Linux
This is the clasic native build.  The GDB will be able to debug native applications running on the GNU/Linux platform that it was built on.

host=cygwin, build=cygwin, target=GNU/Linux
The traditional cross.  The cygwin GDB executable will be capable of debugging GNU/Linux applications but will not run on GNU/Linux (the GDB was built for a cygwin host)

host=GNU/Linux, build=cygwin, target=GNU/Linux
``the bootstrap compile''.  This configuration will cross compile GDB using a cygwin machine so that the final result runs on GNU/Linux.  While the build machine is cygwin, the executable being created won't run on cygwin and won't be able to debug cygwin binaries.  This configuration is the key to bootstraping a compiler / debugger / ... onto a machine that has no native compiler / debugger / ...

host=GNU/Linux build=cygwin target=BSD
``the canadian cross'' This builds, using the cygwin system, a GDB exectable that runs under GNU/Linux but debugs a BSD target.  Figuring out why you would wan't to do this is left as an exercise to the reader.
>Fix:
To debug a remote target using GDBSERVER, you need to do two things:

- configure/build a cross debugger (host=cygwin build=cygwin target=GNU/Linux).

- configure/cross-compile gdbserver (host=GNU/Linux build=cygwin target=GNU/Linux).  For this to work, you'll also need to have GNU/Linux cross compiler pre-installed on your cygwin system.
>Release-Note:
>Audit-Trail:
>Unformatted:


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