Files
oldlinux-files/Ref-docs/manual gdb/gdb/gdb_19.html
2024-02-19 00:21:47 -05:00

2445 lines
106 KiB
HTML

<HTML>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Created on November, 11 2002 by texi2html 1.64 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
-->
<HEAD>
<TITLE>Debugging with GDB: Configurations</TITLE>
<META NAME="description" CONTENT="Debugging with GDB: Configurations">
<META NAME="keywords" CONTENT="Debugging with GDB: Configurations">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="texi2html 1.64">
</HEAD>
<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
<A NAME="SEC143"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_18.html#SEC142"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC144"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_3.html#SEC6"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H1> 18. Configuration-Specific Information </H1>
<!--docid::SEC143::-->
<P>
While nearly all GDB commands are available for all native and
cross versions of the debugger, there are some exceptions. This chapter
describes things that are only available in certain configurations.
</P><P>
There are three major categories of configurations: native
configurations, where the host and target are the same, embedded
operating system configurations, which are usually the same for several
different processor architectures, and bare embedded processors, which
are quite different from each other.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC144">18.1 Native</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC149">18.2 Embedded Operating Systems</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC154">18.3 Embedded Processors</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC180">18.4 Architectures</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Native"></A>
<HR SIZE="6">
<A NAME="SEC144"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC145"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 18.1 Native </H2>
<!--docid::SEC144::-->
<P>
This section describes details specific to particular native
configurations.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC145">18.1.1 HP-UX</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC146">18.1.2 SVR4 process information</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC147">18.1.3 Features for Debugging DJGPP Programs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Features specific to the DJGPP port</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC148">18.1.4 Features for Debugging MS Windows PE executables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Features specific to the Cygwin port</TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="HP-UX"></A>
<HR SIZE="6">
<A NAME="SEC145"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC144"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC146"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC144"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.1.1 HP-UX </H3>
<!--docid::SEC145::-->
<P>
On HP-UX systems, if you refer to a function or variable name that
begins with a dollar sign, GDB searches for a user or system
name first, before it searches for a convenience variable.
</P><P>
<A NAME="SVR4 Process Information"></A>
<HR SIZE="6">
<A NAME="SEC146"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC145"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC147"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC147"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC144"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.1.2 SVR4 process information </H3>
<!--docid::SEC146::-->
<P>
<A NAME="IDX657"></A>
<A NAME="IDX658"></A>
</P><P>
Many versions of SVR4 provide a facility called <SAMP>`/proc'</SAMP> that can be
used to examine the image of a running process using file-system
subroutines. If GDB is configured for an operating system with
this facility, the command <CODE>info proc</CODE> is available to report on
several kinds of information about the process running your program.
<CODE>info proc</CODE> works only on SVR4 systems that include the
<CODE>procfs</CODE> code. This includes OSF/1 (Digital Unix), Solaris, Irix,
and Unixware, but not HP-UX or GNU/Linux, for example.
</P><P>
<DL COMPACT>
<A NAME="IDX659"></A>
<DT><CODE>info proc</CODE>
<DD>Summarize available information about the process.
<P>
<A NAME="IDX660"></A>
<DT><CODE>info proc mappings</CODE>
<DD>Report on the address ranges accessible in the program, with information
on whether your program may read, write, or execute each range.
</DL>
<P>
<A NAME="DJGPP Native"></A>
<HR SIZE="6">
<A NAME="SEC147"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC146"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC148"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC148"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC144"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.1.3 Features for Debugging DJGPP Programs </H3>
<!--docid::SEC147::-->
<P>
DJGPP is the port of GNU development tools to MS-DOS and
MS-Windows. DJGPP programs are 32-bit protected-mode programs
that use the <EM>DPMI</EM> (DOS Protected-Mode Interface) API to run on
top of real-mode DOS systems and their emulations.
</P><P>
GDB supports native debugging of DJGPP programs, and
defines a few commands specific to the DJGPP port. This
subsection describes those commands.
</P><P>
<DL COMPACT>
<A NAME="IDX661"></A>
<DT><CODE>info dos</CODE>
<DD>This is a prefix of DJGPP-specific commands which print
information about the target system and important OS structures.
<P>
<A NAME="IDX662"></A>
<A NAME="IDX663"></A>
<A NAME="IDX664"></A>
<DT><CODE>info dos sysinfo</CODE>
<DD>This command displays assorted information about the underlying
platform: the CPU type and features, the OS version and flavor, the
DPMI version, and the available conventional and DPMI memory.
<P>
<A NAME="IDX665"></A>
<A NAME="IDX666"></A>
<A NAME="IDX667"></A>
<A NAME="IDX668"></A>
<A NAME="IDX669"></A>
<DT><CODE>info dos gdt</CODE>
<DD><DT><CODE>info dos ldt</CODE>
<DD><DT><CODE>info dos idt</CODE>
<DD>These 3 commands display entries from, respectively, Global, Local,
and Interrupt Descriptor Tables (GDT, LDT, and IDT). The descriptor
tables are data structures which store a descriptor for each segment
that is currently in use. The segment's selector is an index into a
descriptor table; the table entry for that index holds the
descriptor's base address and limit, and its attributes and access
rights.
<P>
A typical DJGPP program uses 3 segments: a code segment, a data
segment (used for both data and the stack), and a DOS segment (which
allows access to DOS/BIOS data structures and absolute addresses in
conventional memory). However, the DPMI host will usually define
additional segments in order to support the DPMI environment.
</P><P>
<A NAME="IDX670"></A>
These commands allow to display entries from the descriptor tables.
Without an argument, all entries from the specified table are
displayed. An argument, which should be an integer expression, means
display a single entry whose index is given by the argument. For
example, here's a convenient way to display information about the
debugged program's data segment:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre><CODE>(gdb) info dos ldt $ds</CODE>
<CODE>0x13f: base=0x11970000 limit=0x0009ffff 32-Bit Data (Read/Write, Exp-up)</CODE>
</FONT></pre></td></tr></table></P><P>
This comes in handy when you want to see whether a pointer is outside
the data segment's limit (i.e. <EM>garbled</EM>).
</P><P>
<A NAME="IDX671"></A>
<DT><CODE>info dos pde</CODE>
<DD><DT><CODE>info dos pte</CODE>
<DD>These two commands display entries from, respectively, the Page
Directory and the Page Tables. Page Directories and Page Tables are
data structures which control how virtual memory addresses are mapped
into physical addresses. A Page Table includes an entry for every
page of memory that is mapped into the program's address space; there
may be several Page Tables, each one holding up to 4096 entries. A
Page Directory has up to 4096 entries, one each for every Page Table
that is currently in use.
<P>
Without an argument, <KBD>info dos pde</KBD> displays the entire Page
Directory, and <KBD>info dos pte</KBD> displays all the entries in all of
the Page Tables. An argument, an integer expression, given to the
<KBD>info dos pde</KBD> command means display only that entry from the Page
Directory table. An argument given to the <KBD>info dos pte</KBD> command
means display entries from a single Page Table, the one pointed to by
the specified entry in the Page Directory.
</P><P>
<A NAME="IDX672"></A>
These commands are useful when your program uses <EM>DMA</EM> (Direct
Memory Access), which needs physical addresses to program the DMA
controller.
</P><P>
These commands are supported only with some DPMI servers.
</P><P>
<A NAME="IDX673"></A>
<DT><CODE>info dos address-pte <VAR>addr</VAR></CODE>
<DD>This command displays the Page Table entry for a specified linear
address. The argument linear address <VAR>addr</VAR> should already have the
appropriate segment's base address added to it, because this command
accepts addresses which may belong to <EM>any</EM> segment. For
example, here's how to display the Page Table entry for the page where
the variable <CODE>i</CODE> is stored:
<P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre><CODE>(gdb) info dos address-pte __djgpp_base_address + (char *)&#38;i</CODE>
<CODE>Page Table entry for address 0x11a00d30:</CODE>
<CODE>Base=0x02698000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0xd30</CODE>
</FONT></pre></td></tr></table></P><P>
This says that <CODE>i</CODE> is stored at offset <CODE>0xd30</CODE> from the page
whose physical base address is <CODE>0x02698000</CODE>, and prints all the
attributes of that page.
</P><P>
Note that you must cast the addresses of variables to a <CODE>char *</CODE>,
since otherwise the value of <CODE>__djgpp_base_address</CODE>, the base
address of all variables and functions in a DJGPP program, will
be added using the rules of C pointer arithmetics: if <CODE>i</CODE> is
declared an <CODE>int</CODE>, GDB will add 4 times the value of
<CODE>__djgpp_base_address</CODE> to the address of <CODE>i</CODE>.
</P><P>
Here's another example, it displays the Page Table entry for the
transfer buffer:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre><CODE>(gdb) info dos address-pte *((unsigned *)&#38;_go32_info_block + 3)</CODE>
<CODE>Page Table entry for address 0x29110:</CODE>
<CODE>Base=0x00029000 Dirty Acc. Not-Cached Write-Back Usr Read-Write +0x110</CODE>
</FONT></pre></td></tr></table></P><P>
(The <CODE>+ 3</CODE> offset is because the transfer buffer's address is the
3rd member of the <CODE>_go32_info_block</CODE> structure.) The output of
this command clearly shows that addresses in conventional memory are
mapped 1:1, i.e. the physical and linear addresses are identical.
</P><P>
This command is supported only with some DPMI servers.
</DL>
<P>
<A NAME="Cygwin Native"></A>
<HR SIZE="6">
<A NAME="SEC148"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC147"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC144"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.1.4 Features for Debugging MS Windows PE executables </H3>
<!--docid::SEC148::-->
<P>
GDB supports native debugging of MS Windows programs, and
defines a few commands specific to the Cygwin port. This
subsection describes those commands.
</P><P>
<DL COMPACT>
<A NAME="IDX674"></A>
<DT><CODE>info w32</CODE>
<DD>This is a prefix of MS Windows specific commands which print
information about the target system and important OS structures.
<P>
<DT><CODE>info w32 selector</CODE>
<DD>This command displays information returned by
the Win32 API <CODE>GetThreadSelectorEntry</CODE> function.
It takes an optional argument that is evaluated to
a long value to give the information about this given selector.
Without argument, this command displays information
about the the six segment registers.
<P>
<A NAME="IDX675"></A>
<DT><CODE>info dll</CODE>
<DD>This is a Cygwin specific alias of info shared.
<P>
<A NAME="IDX676"></A>
<DT><CODE>dll-symbols</CODE>
<DD>This command loads symbols from a dll similarly to
add-sym command but without the need to specify a base address.
<P>
<A NAME="IDX677"></A>
<DT><CODE>set new-console <VAR>mode</VAR></CODE>
<DD>If <VAR>mode</VAR> is <CODE>on</CODE> the debuggee will
be started in a new console on next start.
If <VAR>mode</VAR> is <CODE>off</CODE>i, the debuggee will
be started in the same console as the debugger.
<P>
<A NAME="IDX678"></A>
<DT><CODE>show new-console</CODE>
<DD>Displays whether a new console is used
when the debuggee is started.
<P>
<A NAME="IDX679"></A>
<DT><CODE>set new-group <VAR>mode</VAR></CODE>
<DD>This boolean value controls whether the debuggee should
start a new group or stay in the same group as the debugger.
This affects the way the Windows OS handles
Ctrl-C.
<P>
<A NAME="IDX680"></A>
<DT><CODE>show new-group</CODE>
<DD>Displays current value of new-group boolean.
<P>
<A NAME="IDX681"></A>
<DT><CODE>set debugevents</CODE>
<DD>This boolean value adds debug output concerning events seen by the debugger.
<P>
<A NAME="IDX682"></A>
<DT><CODE>set debugexec</CODE>
<DD>This boolean value adds debug output concerning execute events
seen by the debugger.
<P>
<A NAME="IDX683"></A>
<DT><CODE>set debugexceptions</CODE>
<DD>This boolean value adds debug ouptut concerning exception events
seen by the debugger.
<P>
<A NAME="IDX684"></A>
<DT><CODE>set debugmemory</CODE>
<DD>This boolean value adds debug ouptut concerning memory events
seen by the debugger.
<P>
<A NAME="IDX685"></A>
<DT><CODE>set shell</CODE>
<DD>This boolean values specifies whether the debuggee is called
via a shell or directly (default value is on).
<P>
<A NAME="IDX686"></A>
<DT><CODE>show shell</CODE>
<DD>Displays if the debuggee will be started with a shell.
<P>
</DL>
<P>
<A NAME="Embedded OS"></A>
<HR SIZE="6">
<A NAME="SEC149"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC148"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC150"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 18.2 Embedded Operating Systems </H2>
<!--docid::SEC149::-->
<P>
This section describes configurations involving the debugging of
embedded operating systems that are available for several different
architectures.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC150">18.2.1 Using GDB with VxWorks</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
GDB includes the ability to debug programs running on
various real-time operating systems.
</P><P>
<A NAME="VxWorks"></A>
<HR SIZE="6">
<A NAME="SEC150"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC151"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC149"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.2.1 Using GDB with VxWorks </H3>
<!--docid::SEC150::-->
<P>
<A NAME="IDX687"></A>
</P><P>
<DL COMPACT>
<A NAME="IDX688"></A>
<DT><CODE>target vxworks <VAR>machinename</VAR></CODE>
<DD>A VxWorks system, attached via TCP/IP. The argument <VAR>machinename</VAR>
is the target system's machine name or IP address.
<P>
</DL>
<P>
On VxWorks, <CODE>load</CODE> links <VAR>filename</VAR> dynamically on the
current target system as well as adding its symbols in GDB.
</P><P>
GDB enables developers to spawn and debug tasks running on networked
VxWorks targets from a Unix host. Already-running tasks spawned from
the VxWorks shell can also be debugged. GDB uses code that runs on
both the Unix host and on the VxWorks target. The program
<CODE>gdb</CODE> is installed and executed on the Unix host. (It may be
installed with the name <CODE>vxgdb</CODE>, to distinguish it from a
GDB for debugging programs on the host itself.)
</P><P>
<DL COMPACT>
<DT><CODE>VxWorks-timeout <VAR>args</VAR></CODE>
<DD><A NAME="IDX689"></A>
All VxWorks-based targets now support the option <CODE>vxworks-timeout</CODE>.
This option is set by the user, and <VAR>args</VAR> represents the number of
seconds GDB waits for responses to rpc's. You might use this if
your VxWorks target is a slow software simulator or is on the far side
of a thin network line.
</DL>
<P>
The following information on connecting to VxWorks was current when
this manual was produced; newer releases of VxWorks may use revised
procedures.
</P><P>
<A NAME="IDX690"></A>
To use GDB with VxWorks, you must rebuild your VxWorks kernel
to include the remote debugging interface routines in the VxWorks
library <TT>`rdb.a'</TT>. To do this, define <CODE>INCLUDE_RDB</CODE> in the
VxWorks configuration file <TT>`configAll.h'</TT> and rebuild your VxWorks
kernel. The resulting kernel contains <TT>`rdb.a'</TT>, and spawns the
source debugging task <CODE>tRdbTask</CODE> when VxWorks is booted. For more
information on configuring and remaking VxWorks, see the manufacturer's
manual.
</P><P>
Once you have included <TT>`rdb.a'</TT> in your VxWorks system image and set
your Unix execution search path to find GDB, you are ready to
run GDB. From your Unix host, run <CODE>gdb</CODE> (or
<CODE>vxgdb</CODE>, depending on your installation).
</P><P>
GDB comes up showing the prompt:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(vxgdb)
</FONT></pre></td></tr></table></P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC151">18.2.1.1 Connecting to VxWorks</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC152">18.2.1.2 VxWorks download</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC153">18.2.1.3 Running tasks</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="VxWorks Connection"></A>
<HR SIZE="6">
<A NAME="SEC151"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC150"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC152"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC150"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.2.1.1 Connecting to VxWorks </H4>
<!--docid::SEC151::-->
<P>
The GDB command <CODE>target</CODE> lets you connect to a VxWorks target on the
network. To connect to a target whose host name is "<CODE>tt</CODE>", type:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(vxgdb) target vxworks tt
</FONT></pre></td></tr></table></P><P>
GDB displays messages like these:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>Attaching remote machine across net...
Connected to tt.
</FONT></pre></td></tr></table></P><P>
GDB then attempts to read the symbol tables of any object modules
loaded into the VxWorks target since it was last booted. GDB locates
these files by searching the directories listed in the command search
path (see section <A HREF="gdb_5.html#SEC20">Your program's environment</A>); if it fails
to find an object file, it displays a message such as:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>prog.o: No such file or directory.
</FONT></pre></td></tr></table></P><P>
When this happens, add the appropriate directory to the search path with
the GDB command <CODE>path</CODE>, and execute the <CODE>target</CODE>
command again.
</P><P>
<A NAME="VxWorks Download"></A>
<HR SIZE="6">
<A NAME="SEC152"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC151"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC153"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC153"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC150"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.2.1.2 VxWorks download </H4>
<!--docid::SEC152::-->
<P>
<A NAME="IDX691"></A>
If you have connected to the VxWorks target and you want to debug an
object that has not yet been loaded, you can use the GDB
<CODE>load</CODE> command to download a file from Unix to VxWorks
incrementally. The object file given as an argument to the <CODE>load</CODE>
command is actually opened twice: first by the VxWorks target in order
to download the code, then by GDB in order to read the symbol
table. This can lead to problems if the current working directories on
the two systems differ. If both systems have NFS mounted the same
filesystems, you can avoid these problems by using absolute paths.
Otherwise, it is simplest to set the working directory on both systems
to the directory in which the object file resides, and then to reference
the file by its name, without any path. For instance, a program
<TT>`prog.o'</TT> may reside in <TT>`<VAR>vxpath</VAR>/vw/demo/rdb'</TT> in VxWorks
and in <TT>`<VAR>hostpath</VAR>/vw/demo/rdb'</TT> on the host. To load this
program, type this on VxWorks:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>-&#62; cd "<VAR>vxpath</VAR>/vw/demo/rdb"
</FONT></pre></td></tr></table></P><P>
Then, in GDB, type:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(vxgdb) cd <VAR>hostpath</VAR>/vw/demo/rdb
(vxgdb) load prog.o
</FONT></pre></td></tr></table></P><P>
GDB displays a response similar to this:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>Reading symbol data from wherever/vw/demo/rdb/prog.o... done.
</FONT></pre></td></tr></table></P><P>
You can also use the <CODE>load</CODE> command to reload an object module
after editing and recompiling the corresponding source file. Note that
this makes GDB delete all currently-defined breakpoints,
auto-displays, and convenience variables, and to clear the value
history. (This is necessary in order to preserve the integrity of
debugger's data structures that reference the target system's symbol
table.)
</P><P>
<A NAME="VxWorks Attach"></A>
<HR SIZE="6">
<A NAME="SEC153"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC152"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC150"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.2.1.3 Running tasks </H4>
<!--docid::SEC153::-->
<P>
<A NAME="IDX692"></A>
You can also attach to an existing task using the <CODE>attach</CODE> command as
follows:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(vxgdb) attach <VAR>task</VAR>
</FONT></pre></td></tr></table></P><P>
where <VAR>task</VAR> is the VxWorks hexadecimal task ID. The task can be running
or suspended when you attach to it. Running tasks are suspended at
the time of attachment.
</P><P>
<A NAME="Embedded Processors"></A>
<HR SIZE="6">
<A NAME="SEC154"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC153"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC155"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 18.3 Embedded Processors </H2>
<!--docid::SEC154::-->
<P>
This section goes into details specific to particular embedded
configurations.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC155">18.3.1 ARM</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC156">18.3.2 Hitachi H8/300</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC160">18.3.3 H8/500</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Hitachi H8/500</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC161">18.3.4 Intel i960</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC165">18.3.5 Mitsubishi M32R/D</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC166">18.3.6 M68k</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Motorola M68K</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC167">18.3.7 MIPS Embedded</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC168">18.3.8 OpenRISC 1000</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">OpenRisc 1000</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC170">18.3.10 HP PA Embedded</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC169">18.3.9 PowerPC</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC171">18.3.11 Hitachi SH</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC172">18.3.12 Tsqware Sparclet</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC177">18.3.13 Fujitsu Sparclite</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC178">18.3.14 Tandem ST2000</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC179">18.3.15 Zilog Z8000</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="ARM"></A>
<HR SIZE="6">
<A NAME="SEC155"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.1 ARM </H3>
<!--docid::SEC155::-->
<P>
<DL COMPACT>
<A NAME="IDX693"></A>
<DT><CODE>target rdi <VAR>dev</VAR></CODE>
<DD>ARM Angel monitor, via RDI library interface to ADP protocol. You may
use this target to communicate with both boards running the Angel
monitor, or with the EmbeddedICE JTAG debug device.
<P>
<A NAME="IDX694"></A>
<DT><CODE>target rdp <VAR>dev</VAR></CODE>
<DD>ARM Demon monitor.
<P>
</DL>
<P>
<A NAME="H8/300"></A>
<HR SIZE="6">
<A NAME="SEC156"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC155"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC157"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.2 Hitachi H8/300 </H3>
<!--docid::SEC156::-->
<P>
<DL COMPACT>
<A NAME="IDX695"></A>
<DT><CODE>target hms <VAR>dev</VAR></CODE>
<DD>A Hitachi SH, H8/300, or H8/500 board, attached via serial line to your host.
Use special commands <CODE>device</CODE> and <CODE>speed</CODE> to control the serial
line and the communications speed used.
<P>
<A NAME="IDX696"></A>
<DT><CODE>target e7000 <VAR>dev</VAR></CODE>
<DD>E7000 emulator for Hitachi H8 and SH.
<P>
<A NAME="IDX697"></A>
<A NAME="IDX698"></A>
<DT><CODE>target sh3 <VAR>dev</VAR></CODE>
<DD><DT><CODE>target sh3e <VAR>dev</VAR></CODE>
<DD>Hitachi SH-3 and SH-3E target systems.
<P>
</DL>
<P>
<A NAME="IDX699"></A>
<A NAME="IDX700"></A>
<A NAME="IDX701"></A>
<A NAME="IDX702"></A>
When you select remote debugging to a Hitachi SH, H8/300, or H8/500
board, the <CODE>load</CODE> command downloads your program to the Hitachi
board and also opens it as the current executable target for
GDB on your host (like the <CODE>file</CODE> command).
</P><P>
GDB needs to know these things to talk to your
Hitachi SH, H8/300, or H8/500:
</P><P>
<OL>
<LI>
that you want to use <SAMP>`target hms'</SAMP>, the remote debugging interface
for Hitachi microprocessors, or <SAMP>`target e7000'</SAMP>, the in-circuit
emulator for the Hitachi SH and the Hitachi 300H. (<SAMP>`target hms'</SAMP> is
the default when GDB is configured specifically for the Hitachi SH,
H8/300, or H8/500.)
<P>
<LI>
what serial device connects your host to your Hitachi board (the first
serial device available on your host is the default).
<P>
<LI>
what speed to use over the serial device.
</OL>
<P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC157">18.3.2.1 Connecting to Hitachi boards</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC158">18.3.2.2 Using the E7000 in-circuit emulator</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Using the E7000 In-Circuit Emulator.</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC159">18.3.2.3 Special GDB commands for Hitachi micros</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Hitachi Boards"></A>
<HR SIZE="6">
<A NAME="SEC157"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC158"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.2.1 Connecting to Hitachi boards </H4>
<!--docid::SEC157::-->
<P>
<A NAME="IDX703"></A>
<A NAME="IDX704"></A>
Use the special <CODE>GDB</CODE> command <SAMP>`device <VAR>port</VAR>'</SAMP> if you
need to explicitly set the serial device. The default <VAR>port</VAR> is the
first available port on your host. This is only necessary on Unix
hosts, where it is typically something like <TT>`/dev/ttya'</TT>.
</P><P>
<A NAME="IDX705"></A>
<A NAME="IDX706"></A>
<CODE>GDB</CODE> has another special command to set the communications
speed: <SAMP>`speed <VAR>bps</VAR>'</SAMP>. This command also is only used from Unix
hosts; on DOS hosts, set the line speed as usual from outside GDB with
the DOS <CODE>mode</CODE> command (for instance,
<KBD>mode com2:9600,n,8,1,p</KBD> for a 9600bps connection).
</P><P>
The <SAMP>`device'</SAMP> and <SAMP>`speed'</SAMP> commands are available only when you
use a Unix host to debug your Hitachi microprocessor programs. If you
use a DOS host,
GDB depends on an auxiliary terminate-and-stay-resident program
called <CODE>asynctsr</CODE> to communicate with the development board
through a PC serial port. You must also use the DOS <CODE>mode</CODE> command
to set up the serial port on the DOS side.
</P><P>
The following sample session illustrates the steps needed to start a
program under GDB control on an H8/300. The example uses a
sample H8/300 program called <TT>`t.x'</TT>. The procedure is the same for
the Hitachi SH and the H8/500.
</P><P>
First hook up your development board. In this example, we use a
board attached to serial port <CODE>COM2</CODE>; if you use a different serial
port, substitute its name in the argument of the <CODE>mode</CODE> command.
When you call <CODE>asynctsr</CODE>, the auxiliary comms program used by the
debugger, you give it just the numeric part of the serial port's name;
for example, <SAMP>`asyncstr 2'</SAMP> below runs <CODE>asyncstr</CODE> on
<CODE>COM2</CODE>.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>C:\H8300\TEST&#62; asynctsr 2
C:\H8300\TEST&#62; mode com2:9600,n,8,1,p
Resident portion of MODE loaded
COM2: 9600, n, 8, 1, p
</FONT></pre></td></tr></table></P><P>
<BLOCKQUOTE>
<EM>Warning:</EM> We have noticed a bug in PC-NFS that conflicts with
<CODE>asynctsr</CODE>. If you also run PC-NFS on your DOS host, you may need to
disable it, or even boot without it, to use <CODE>asynctsr</CODE> to control
your development board.
</BLOCKQUOTE>
<P>
<A NAME="IDX707"></A>
Now that serial communications are set up, and the development board is
connected, you can start up GDB. Call <CODE>gdb</CODE> with
the name of your program as the argument. <CODE>GDB</CODE> prompts
you, as usual, with the prompt <SAMP>`(gdb)'</SAMP>. Use two special
commands to begin your debugging session: <SAMP>`target hms'</SAMP> to specify
cross-debugging to the Hitachi board, and the <CODE>load</CODE> command to
download your program to the board. <CODE>load</CODE> displays the names of
the program's sections, and a <SAMP>`*'</SAMP> for each 2K of data downloaded.
(If you want to refresh GDB data on symbols or on the
executable file without downloading, use the GDB commands
<CODE>file</CODE> or <CODE>symbol-file</CODE>. These commands, and <CODE>load</CODE>
itself, are described in <A HREF="gdb_16.html#SEC128">Commands to specify files</A>.)
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(eg-C:\H8300\TEST) gdb t.x
GDB is free software and you are welcome to distribute copies
of it under certain conditions; type "show copying" to see
the conditions.
There is absolutely no warranty for GDB; type "show warranty"
for details.
GDB 20021112, Copyright 1992 Free Software Foundation, Inc...
(gdb) target hms
Connected to remote H8/300 HMS system.
(gdb) load t.x
.text : 0x8000 .. 0xabde ***********
.data : 0xabde .. 0xad30 *
.stack : 0xf000 .. 0xf014 *
</FONT></pre></td></tr></table></P><P>
At this point, you're ready to run or debug your program. From here on,
you can use all the usual GDB commands. The <CODE>break</CODE> command
sets breakpoints; the <CODE>run</CODE> command starts your program;
<CODE>print</CODE> or <CODE>x</CODE> display data; the <CODE>continue</CODE> command
resumes execution after stopping at a breakpoint. You can use the
<CODE>help</CODE> command at any time to find out more about GDB commands.
</P><P>
Remember, however, that <EM>operating system</EM> facilities aren't
available on your development board; for example, if your program hangs,
you can't send an interrupt--but you can press the RESET switch!
</P><P>
Use the RESET button on the development board
<UL>
<LI>
to interrupt your program (don't use <KBD>ctl-C</KBD> on the DOS host--it has
no way to pass an interrupt signal to the development board); and
<P>
<LI>
to return to the GDB command prompt after your program finishes
normally. The communications protocol provides no other way for GDB
to detect program completion.
</UL>
<P>
In either case, GDB sees the effect of a RESET on the
development board as a "normal exit" of your program.
</P><P>
<A NAME="Hitachi ICE"></A>
<HR SIZE="6">
<A NAME="SEC158"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC157"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC159"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC159"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.2.2 Using the E7000 in-circuit emulator </H4>
<!--docid::SEC158::-->
<P>
<A NAME="IDX708"></A>
You can use the E7000 in-circuit emulator to develop code for either the
Hitachi SH or the H8/300H. Use one of these forms of the <SAMP>`target
e7000'</SAMP> command to connect GDB to your E7000:
</P><P>
<DL COMPACT>
<DT><CODE>target e7000 <VAR>port</VAR> <VAR>speed</VAR></CODE>
<DD>Use this form if your E7000 is connected to a serial port. The
<VAR>port</VAR> argument identifies what serial port to use (for example,
<SAMP>`com2'</SAMP>). The third argument is the line speed in bits per second
(for example, <SAMP>`9600'</SAMP>).
<P>
<DT><CODE>target e7000 <VAR>hostname</VAR></CODE>
<DD>If your E7000 is installed as a host on a TCP/IP network, you can just
specify its hostname; GDB uses <CODE>telnet</CODE> to connect.
</DL>
<P>
<A NAME="Hitachi Special"></A>
<HR SIZE="6">
<A NAME="SEC159"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC158"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.2.3 Special GDB commands for Hitachi micros </H4>
<!--docid::SEC159::-->
<P>
Some GDB commands are available only for the H8/300:
</P><P>
<DL COMPACT>
<A NAME="IDX709"></A>
<A NAME="IDX710"></A>
<DT><CODE>set machine h8300</CODE>
<DD><DT><CODE>set machine h8300h</CODE>
<DD>Condition GDB for one of the two variants of the H8/300
architecture with <SAMP>`set machine'</SAMP>. You can use <SAMP>`show machine'</SAMP>
to check which variant is currently in effect.
<P>
</DL>
<P>
<A NAME="H8/500"></A>
<HR SIZE="6">
<A NAME="SEC160"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC159"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC161"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC161"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.3 H8/500 </H3>
<!--docid::SEC160::-->
<P>
<DL COMPACT>
<A NAME="IDX711"></A>
<A NAME="IDX712"></A>
<DT><CODE>set memory <VAR>mod</VAR></CODE>
<DD><DT><CODE>show memory</CODE>
<DD>Specify which H8/500 memory model (<VAR>mod</VAR>) you are using with
<SAMP>`set memory'</SAMP>; check which memory model is in effect with <SAMP>`show
memory'</SAMP>. The accepted values for <VAR>mod</VAR> are <CODE>small</CODE>,
<CODE>big</CODE>, <CODE>medium</CODE>, and <CODE>compact</CODE>.
<P>
</DL>
<P>
<A NAME="i960"></A>
<HR SIZE="6">
<A NAME="SEC161"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC160"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC162"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.4 Intel i960 </H3>
<!--docid::SEC161::-->
<P>
<DL COMPACT>
<A NAME="IDX713"></A>
<DT><CODE>target mon960 <VAR>dev</VAR></CODE>
<DD>MON960 monitor for Intel i960.
<P>
<A NAME="IDX714"></A>
<DT><CODE>target nindy <VAR>devicename</VAR></CODE>
<DD>An Intel 960 board controlled by a Nindy Monitor. <VAR>devicename</VAR> is
the name of the serial device to use for the connection, e.g.
<TT>`/dev/ttya'</TT>.
<P>
</DL>
<P>
<A NAME="IDX715"></A>
<A NAME="IDX716"></A>
<EM>Nindy</EM> is a ROM Monitor program for Intel 960 target systems. When
GDB is configured to control a remote Intel 960 using Nindy, you can
tell GDB how to connect to the 960 in several ways:
</P><P>
<UL>
<LI>
Through command line options specifying serial port, version of the
Nindy protocol, and communications speed;
<P>
<LI>
By responding to a prompt on startup;
<P>
<LI>
By using the <CODE>target</CODE> command at any point during your GDB
session. See section <A HREF="gdb_17.html#SEC132">Commands for managing targets</A>.
<P>
</UL>
<P>
<A NAME="IDX717"></A>
With the Nindy interface to an Intel 960 board, <CODE>load</CODE>
downloads <VAR>filename</VAR> to the 960 as well as adding its symbols in
GDB.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC162">18.3.4.1 Startup with Nindy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC163">18.3.4.2 Options for Nindy</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC164">18.3.4.3 Nindy reset command</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Nindy Startup"></A>
<HR SIZE="6">
<A NAME="SEC162"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC161"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC163"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC161"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.4.1 Startup with Nindy </H4>
<!--docid::SEC162::-->
<P>
If you simply start <CODE>gdb</CODE> without using any command-line
options, you are prompted for what serial port to use, <EM>before</EM> you
reach the ordinary GDB prompt:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>Attach /dev/ttyNN -- specify NN, or "quit" to quit:
</FONT></pre></td></tr></table></P><P>
Respond to the prompt with whatever suffix (after <SAMP>`/dev/tty'</SAMP>)
identifies the serial port you want to use. You can, if you choose,
simply start up with no Nindy connection by responding to the prompt
with an empty line. If you do this and later wish to attach to Nindy,
use <CODE>target</CODE> (see section <A HREF="gdb_17.html#SEC132">Commands for managing targets</A>).
</P><P>
<A NAME="Nindy Options"></A>
<HR SIZE="6">
<A NAME="SEC163"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC162"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC164"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC164"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC161"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.4.2 Options for Nindy </H4>
<!--docid::SEC163::-->
<P>
These are the startup options for beginning your GDB session with a
Nindy-960 board attached:
</P><P>
<DL COMPACT>
<DT><CODE>-r <VAR>port</VAR></CODE>
<DD>Specify the serial port name of a serial interface to be used to connect
to the target system. This option is only available when GDB is
configured for the Intel 960 target architecture. You may specify
<VAR>port</VAR> as any of: a full pathname (e.g. <SAMP>`-r /dev/ttya'</SAMP>), a
device name in <TT>`/dev'</TT> (e.g. <SAMP>`-r ttya'</SAMP>), or simply the unique
suffix for a specific <CODE>tty</CODE> (e.g. <SAMP>`-r a'</SAMP>).
<P>
<DT><CODE>-O</CODE>
<DD>(An uppercase letter "O", not a zero.) Specify that GDB should use
the "old" Nindy monitor protocol to connect to the target system.
This option is only available when GDB is configured for the Intel 960
target architecture.
<P>
<BLOCKQUOTE>
<EM>Warning:</EM> if you specify <SAMP>`-O'</SAMP>, but are actually trying to
connect to a target system that expects the newer protocol, the connection
fails, appearing to be a speed mismatch. GDB repeatedly
attempts to reconnect at several different line speeds. You can abort
this process with an interrupt.
</BLOCKQUOTE>
<P>
<DT><CODE>-brk</CODE>
<DD>Specify that GDB should first send a <CODE>BREAK</CODE> signal to the target
system, in an attempt to reset it, before connecting to a Nindy target.
<P>
<BLOCKQUOTE>
<EM>Warning:</EM> Many target systems do not have the hardware that this
requires; it only works with a few boards.
</BLOCKQUOTE>
</DL>
<P>
The standard <SAMP>`-b'</SAMP> option controls the line speed used on the serial
port.
</P><P>
<A NAME="Nindy Reset"></A>
<HR SIZE="6">
<A NAME="SEC164"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC163"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC161"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.4.3 Nindy reset command </H4>
<!--docid::SEC164::-->
<P>
<DL COMPACT>
<DT><CODE>reset</CODE>
<DD><A NAME="IDX718"></A>
For a Nindy target, this command sends a "break" to the remote target
system; this is only useful if the target has been equipped with a
circuit to perform a hard reset (or some other interesting action) when
a break is detected.
</DL>
<P>
<A NAME="M32R/D"></A>
<HR SIZE="6">
<A NAME="SEC165"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC164"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC166"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC166"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.5 Mitsubishi M32R/D </H3>
<!--docid::SEC165::-->
<P>
<DL COMPACT>
<A NAME="IDX719"></A>
<DT><CODE>target m32r <VAR>dev</VAR></CODE>
<DD>Mitsubishi M32R/D ROM monitor.
<P>
</DL>
<P>
<A NAME="M68K"></A>
<HR SIZE="6">
<A NAME="SEC166"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC165"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC167"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC167"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.6 M68k </H3>
<!--docid::SEC166::-->
<P>
The Motorola m68k configuration includes ColdFire support, and
target command for the following ROM monitors.
</P><P>
<DL COMPACT>
<A NAME="IDX720"></A>
<DT><CODE>target abug <VAR>dev</VAR></CODE>
<DD>ABug ROM monitor for M68K.
<P>
<A NAME="IDX721"></A>
<DT><CODE>target cpu32bug <VAR>dev</VAR></CODE>
<DD>CPU32BUG monitor, running on a CPU32 (M68K) board.
<P>
<A NAME="IDX722"></A>
<DT><CODE>target dbug <VAR>dev</VAR></CODE>
<DD>dBUG ROM monitor for Motorola ColdFire.
<P>
<A NAME="IDX723"></A>
<DT><CODE>target est <VAR>dev</VAR></CODE>
<DD>EST-300 ICE monitor, running on a CPU32 (M68K) board.
<P>
<A NAME="IDX724"></A>
<DT><CODE>target rom68k <VAR>dev</VAR></CODE>
<DD>ROM 68K monitor, running on an M68K IDP board.
<P>
</DL>
<P>
If GDB is configured with <CODE>m68*-ericsson-*</CODE>, it will
instead have only a single special target command:
</P><P>
<DL COMPACT>
<A NAME="IDX725"></A>
<DT><CODE>target es1800 <VAR>dev</VAR></CODE>
<DD>ES-1800 emulator for M68K.
<P>
</DL>
<P>
[context?]
</P><P>
<DL COMPACT>
<A NAME="IDX726"></A>
<DT><CODE>target rombug <VAR>dev</VAR></CODE>
<DD>ROMBUG ROM monitor for OS/9000.
<P>
</DL>
<P>
<A NAME="MIPS Embedded"></A>
<HR SIZE="6">
<A NAME="SEC167"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC166"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC168"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC168"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.7 MIPS Embedded </H3>
<!--docid::SEC167::-->
<P>
<A NAME="IDX727"></A>
GDB can use the MIPS remote debugging protocol to talk to a
MIPS board attached to a serial line. This is available when
you configure GDB with <SAMP>`--target=mips-idt-ecoff'</SAMP>.
</P><P>
Use these GDB commands to specify the connection to your target board:
</P><P>
<DL COMPACT>
<DT><CODE>target mips <VAR>port</VAR></CODE>
<DD><A NAME="IDX728"></A>
To run a program on the board, start up <CODE>gdb</CODE> with the
name of your program as the argument. To connect to the board, use the
command <SAMP>`target mips <VAR>port</VAR>'</SAMP>, where <VAR>port</VAR> is the name of
the serial port connected to the board. If the program has not already
been downloaded to the board, you may use the <CODE>load</CODE> command to
download it. You can then use all the usual GDB commands.
<P>
For example, this sequence connects to the target board through a serial
port, and loads and runs a program called <VAR>prog</VAR> through the
debugger:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>host$ gdb <VAR>prog</VAR>
GDB is free software and <small>...</small>
(gdb) target mips /dev/ttyb
(gdb) load <VAR>prog</VAR>
(gdb) run
</FONT></pre></td></tr></table></P><P>
<DT><CODE>target mips <VAR>hostname</VAR>:<VAR>portnumber</VAR></CODE>
<DD>On some GDB host configurations, you can specify a TCP
connection (for instance, to a serial line managed by a terminal
concentrator) instead of a serial port, using the syntax
<SAMP>`<VAR>hostname</VAR>:<VAR>portnumber</VAR>'</SAMP>.
<P>
<DT><CODE>target pmon <VAR>port</VAR></CODE>
<DD><A NAME="IDX729"></A>
PMON ROM monitor.
<P>
<DT><CODE>target ddb <VAR>port</VAR></CODE>
<DD><A NAME="IDX730"></A>
NEC's DDB variant of PMON for Vr4300.
<P>
<DT><CODE>target lsi <VAR>port</VAR></CODE>
<DD><A NAME="IDX731"></A>
LSI variant of PMON.
<P>
<A NAME="IDX732"></A>
<DT><CODE>target r3900 <VAR>dev</VAR></CODE>
<DD>Densan DVE-R3900 ROM monitor for Toshiba R3900 Mips.
<P>
<A NAME="IDX733"></A>
<DT><CODE>target array <VAR>dev</VAR></CODE>
<DD>Array Tech LSI33K RAID controller board.
<P>
</DL>
<P>
GDB also supports these special commands for MIPS targets:
</P><P>
<DL COMPACT>
<DT><CODE>set processor <VAR>args</VAR></CODE>
<DD><DT><CODE>show processor</CODE>
<DD><A NAME="IDX734"></A>
<A NAME="IDX735"></A>
Use the <CODE>set processor</CODE> command to set the type of MIPS
processor when you want to access processor-type-specific registers.
For example, <CODE>set processor <VAR>r3041</VAR></CODE> tells GDB
to use the CPU registers appropriate for the 3041 chip.
Use the <CODE>show processor</CODE> command to see what MIPS processor GDB
is using. Use the <CODE>info reg</CODE> command to see what registers
GDB is using.
<P>
<DT><CODE>set mipsfpu double</CODE>
<DD><DT><CODE>set mipsfpu single</CODE>
<DD><DT><CODE>set mipsfpu none</CODE>
<DD><DT><CODE>show mipsfpu</CODE>
<DD><A NAME="IDX736"></A>
<A NAME="IDX737"></A>
<A NAME="IDX738"></A>
<A NAME="IDX739"></A>
If your target board does not support the MIPS floating point
coprocessor, you should use the command <SAMP>`set mipsfpu none'</SAMP> (if you
need this, you may wish to put the command in your GDB init
file). This tells GDB how to find the return value of
functions which return floating point values. It also allows
GDB to avoid saving the floating point registers when calling
functions on the board. If you are using a floating point coprocessor
with only single precision floating point support, as on the R4650
processor, use the command <SAMP>`set mipsfpu single'</SAMP>. The default
double precision floating point coprocessor may be selected using
<SAMP>`set mipsfpu double'</SAMP>.
<P>
In previous versions the only choices were double precision or no
floating point, so <SAMP>`set mipsfpu on'</SAMP> will select double precision
and <SAMP>`set mipsfpu off'</SAMP> will select no floating point.
</P><P>
As usual, you can inquire about the <CODE>mipsfpu</CODE> variable with
<SAMP>`show mipsfpu'</SAMP>.
</P><P>
<DT><CODE>set remotedebug <VAR>n</VAR></CODE>
<DD><DT><CODE>show remotedebug</CODE>
<DD><A NAME="IDX740"></A>
<A NAME="IDX741"></A>
<A NAME="IDX742"></A>
<A NAME="IDX743"></A>
You can see some debugging information about communications with the board
by setting the <CODE>remotedebug</CODE> variable. If you set it to <CODE>1</CODE> using
<SAMP>`set remotedebug 1'</SAMP>, every packet is displayed. If you set it
to <CODE>2</CODE>, every character is displayed. You can check the current value
at any time with the command <SAMP>`show remotedebug'</SAMP>.
<P>
<DT><CODE>set timeout <VAR>seconds</VAR></CODE>
<DD><DT><CODE>set retransmit-timeout <VAR>seconds</VAR></CODE>
<DD><DT><CODE>show timeout</CODE>
<DD><DT><CODE>show retransmit-timeout</CODE>
<DD><A NAME="IDX744"></A>
<A NAME="IDX745"></A>
<A NAME="IDX746"></A>
<A NAME="IDX747"></A>
<A NAME="IDX748"></A>
<A NAME="IDX749"></A>
You can control the timeout used while waiting for a packet, in the MIPS
remote protocol, with the <CODE>set timeout <VAR>seconds</VAR></CODE> command. The
default is 5 seconds. Similarly, you can control the timeout used while
waiting for an acknowledgement of a packet with the <CODE>set
retransmit-timeout <VAR>seconds</VAR></CODE> command. The default is 3 seconds.
You can inspect both values with <CODE>show timeout</CODE> and <CODE>show
retransmit-timeout</CODE>. (These commands are <EM>only</EM> available when
GDB is configured for <SAMP>`--target=mips-idt-ecoff'</SAMP>.)
<P>
The timeout set by <CODE>set timeout</CODE> does not apply when GDB
is waiting for your program to stop. In that case, GDB waits
forever because it has no way of knowing how long the program is going
to run before stopping.
</DL>
<P>
<A NAME="OpenRISC 1000"></A>
<HR SIZE="6">
<A NAME="SEC168"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC167"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC169"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC169"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.8 OpenRISC 1000 </H3>
<!--docid::SEC168::-->
<P>
<A NAME="IDX750"></A>
See OR1k Architecture document (<A HREF="www.opencores.org">www.opencores.org</A>) for more information
about platform and commands.
</P><P>
<DL COMPACT>
<A NAME="IDX751"></A>
<DT><CODE>target jtag jtag://<VAR>host</VAR>:<VAR>port</VAR></CODE>
<DD><P>
Connects to remote JTAG server.
JTAG remote server can be either an or1ksim or JTAG server,
connected via parallel port to the board.
</P><P>
Example: <CODE>target jtag jtag://localhost:9999</CODE>
</P><P>
<A NAME="IDX752"></A>
<DT><CODE>or1ksim <VAR>command</VAR></CODE>
<DD>If connected to <CODE>or1ksim</CODE> OpenRISC 1000 Architectural
Simulator, proprietary commands can be executed.
<P>
<A NAME="IDX753"></A>
<DT><CODE>info or1k spr</CODE>
<DD>Displays spr groups.
<P>
<DT><CODE>info or1k spr <VAR>group</VAR></CODE>
<DD><DT><CODE>info or1k spr <VAR>groupno</VAR></CODE>
<DD>Displays register names in selected group.
<P>
<DT><CODE>info or1k spr <VAR>group</VAR> <VAR>register</VAR></CODE>
<DD><DT><CODE>info or1k spr <VAR>register</VAR></CODE>
<DD><DT><CODE>info or1k spr <VAR>groupno</VAR> <VAR>registerno</VAR></CODE>
<DD><DT><CODE>info or1k spr <VAR>registerno</VAR></CODE>
<DD>Shows information about specified spr register.
<P>
<A NAME="IDX754"></A>
<DT><CODE>spr <VAR>group</VAR> <VAR>register</VAR> <VAR>value</VAR></CODE>
<DD><DT><CODE>spr <VAR>register <VAR>value</VAR></VAR></CODE>
<DD><DT><CODE>spr <VAR>groupno</VAR> <VAR>registerno <VAR>value</VAR></VAR></CODE>
<DD><DT><CODE>spr <VAR>registerno <VAR>value</VAR></VAR></CODE>
<DD>Writes <VAR>value</VAR> to specified spr register.
</DL>
<P>
Some implementations of OpenRISC 1000 Architecture also have hardware trace.
It is very similar to GDB trace, except it does not interfere with normal
program execution and is thus much faster. Hardware breakpoints/watchpoint
triggers can be set using:
<DL COMPACT>
<DT><CODE>$LEA/$LDATA</CODE>
<DD>Load effective address/data
<DT><CODE>$SEA/$SDATA</CODE>
<DD>Store effective address/data
<DT><CODE>$AEA/$ADATA</CODE>
<DD>Access effective address ($SEA or $LEA) or data ($SDATA/$LDATA)
<DT><CODE>$FETCH</CODE>
<DD>Fetch data
</DL>
<P>
When triggered, it can capture low level data, like: <CODE>PC</CODE>, <CODE>LSEA</CODE>,
<CODE>LDATA</CODE>, <CODE>SDATA</CODE>, <CODE>READSPR</CODE>, <CODE>WRITESPR</CODE>, <CODE>INSTR</CODE>.
</P><P>
<CODE>htrace</CODE> commands:
<A NAME="IDX755"></A>
<DL COMPACT>
<A NAME="IDX756"></A>
<DT><CODE>hwatch <VAR>conditional</VAR></CODE>
<DD>Set hardware watchpoint on combination of Load/Store Effecive Address(es)
or Data. For example:
<P>
<CODE>hwatch ($LEA == my_var) &#38;&#38; ($LDATA &#60; 50) || ($SEA == my_var) &#38;&#38; ($SDATA &#62;= 50)</CODE>
</P><P>
<CODE>hwatch ($LEA == my_var) &#38;&#38; ($LDATA &#60; 50) || ($SEA == my_var) &#38;&#38; ($SDATA &#62;= 50)</CODE>
</P><P>
<A NAME="IDX757"></A>
<DT><CODE>htrace info</CODE>
<DD>Display information about current HW trace configuration.
<P>
<A NAME="IDX758"></A>
<DT><CODE>htrace trigger <VAR>conditional</VAR></CODE>
<DD>Set starting criteria for HW trace.
<P>
<A NAME="IDX759"></A>
<DT><CODE>htrace qualifier <VAR>conditional</VAR></CODE>
<DD>Set acquisition qualifier for HW trace.
<P>
<A NAME="IDX760"></A>
<DT><CODE>htrace stop <VAR>conditional</VAR></CODE>
<DD>Set HW trace stopping criteria.
<P>
<A NAME="IDX761"></A>
<DT><CODE>htrace record <VAR>[data]*</VAR></CODE>
<DD>Selects the data to be recorded, when qualifier is met and HW trace was
triggered.
<P>
<A NAME="IDX762"></A>
<DT><CODE>htrace enable</CODE>
<DD><A NAME="IDX763"></A>
<DT><CODE>htrace disable</CODE>
<DD>Enables/disables the HW trace.
<P>
<A NAME="IDX764"></A>
<DT><CODE>htrace rewind <VAR>[filename]</VAR></CODE>
<DD>Clears currently recorded trace data.
<P>
If filename is specified, new trace file is made and any newly collected data
will be written there.
</P><P>
<A NAME="IDX765"></A>
<DT><CODE>htrace print <VAR>[start [len]]</VAR></CODE>
<DD>Prints trace buffer, using current record configuration.
<P>
<A NAME="IDX766"></A>
<DT><CODE>htrace mode continuous</CODE>
<DD>Set continuous trace mode.
<P>
<A NAME="IDX767"></A>
<DT><CODE>htrace mode suspend</CODE>
<DD>Set suspend trace mode.
<P>
</DL>
<P>
<A NAME="PowerPC"></A>
<HR SIZE="6">
<A NAME="SEC169"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC168"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC170"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.9 PowerPC </H3>
<!--docid::SEC169::-->
<P>
<DL COMPACT>
<A NAME="IDX768"></A>
<DT><CODE>target dink32 <VAR>dev</VAR></CODE>
<DD>DINK32 ROM monitor.
<P>
<A NAME="IDX769"></A>
<DT><CODE>target ppcbug <VAR>dev</VAR></CODE>
<DD><A NAME="IDX770"></A>
<DT><CODE>target ppcbug1 <VAR>dev</VAR></CODE>
<DD>PPCBUG ROM monitor for PowerPC.
<P>
<A NAME="IDX771"></A>
<DT><CODE>target sds <VAR>dev</VAR></CODE>
<DD>SDS monitor, running on a PowerPC board (such as Motorola's ADS).
<P>
</DL>
<P>
<A NAME="PA"></A>
<HR SIZE="6">
<A NAME="SEC170"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC169"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC171"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.10 HP PA Embedded </H3>
<!--docid::SEC170::-->
<P>
<DL COMPACT>
<A NAME="IDX772"></A>
<DT><CODE>target op50n <VAR>dev</VAR></CODE>
<DD>OP50N monitor, running on an OKI HPPA board.
<P>
<A NAME="IDX773"></A>
<DT><CODE>target w89k <VAR>dev</VAR></CODE>
<DD>W89K monitor, running on a Winbond HPPA board.
<P>
</DL>
<P>
<A NAME="SH"></A>
<HR SIZE="6">
<A NAME="SEC171"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC170"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC172"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.11 Hitachi SH </H3>
<!--docid::SEC171::-->
<P>
<DL COMPACT>
<A NAME="IDX774"></A>
<DT><CODE>target hms <VAR>dev</VAR></CODE>
<DD>A Hitachi SH board attached via serial line to your host. Use special
commands <CODE>device</CODE> and <CODE>speed</CODE> to control the serial line and
the communications speed used.
<P>
<A NAME="IDX775"></A>
<DT><CODE>target e7000 <VAR>dev</VAR></CODE>
<DD>E7000 emulator for Hitachi SH.
<P>
<A NAME="IDX776"></A>
<A NAME="IDX777"></A>
<DT><CODE>target sh3 <VAR>dev</VAR></CODE>
<DD><DT><CODE>target sh3e <VAR>dev</VAR></CODE>
<DD>Hitachi SH-3 and SH-3E target systems.
<P>
</DL>
<P>
<A NAME="Sparclet"></A>
<HR SIZE="6">
<A NAME="SEC172"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC171"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC173"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.12 Tsqware Sparclet </H3>
<!--docid::SEC172::-->
<P>
<A NAME="IDX778"></A>
</P><P>
GDB enables developers to debug tasks running on
Sparclet targets from a Unix host.
GDB uses code that runs on
both the Unix host and on the Sparclet target. The program
<CODE>gdb</CODE> is installed and executed on the Unix host.
</P><P>
<DL COMPACT>
<DT><CODE>remotetimeout <VAR>args</VAR></CODE>
<DD><A NAME="IDX779"></A>
GDB supports the option <CODE>remotetimeout</CODE>.
This option is set by the user, and <VAR>args</VAR> represents the number of
seconds GDB waits for responses.
</DL>
<P>
<A NAME="IDX780"></A>
When compiling for debugging, include the options <SAMP>`-g'</SAMP> to get debug
information and <SAMP>`-Ttext'</SAMP> to relocate the program to where you wish to
load it on the target. You may also want to add the options <SAMP>`-n'</SAMP> or
<SAMP>`-N'</SAMP> in order to reduce the size of the sections. Example:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>sparclet-aout-gcc prog.c -Ttext 0x12010000 -g -o prog -N
</FONT></pre></td></tr></table></P><P>
You can use <CODE>objdump</CODE> to verify that the addresses are what you intended:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>sparclet-aout-objdump --headers --syms prog
</FONT></pre></td></tr></table></P><P>
<A NAME="IDX781"></A>
Once you have set
your Unix execution search path to find GDB, you are ready to
run GDB. From your Unix host, run <CODE>gdb</CODE>
(or <CODE>sparclet-aout-gdb</CODE>, depending on your installation).
</P><P>
GDB comes up showing the prompt:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(gdbslet)
</FONT></pre></td></tr></table></P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC173">18.3.12.1 Setting file to debug</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Setting the file to debug</TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC174">18.3.12.2 Connecting to Sparclet</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC175">18.3.12.3 Sparclet download</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC176">18.3.12.4 Running and debugging</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="Sparclet File"></A>
<HR SIZE="6">
<A NAME="SEC173"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC172"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC174"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC172"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.12.1 Setting file to debug </H4>
<!--docid::SEC173::-->
<P>
The GDB command <CODE>file</CODE> lets you choose with program to debug.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(gdbslet) file prog
</FONT></pre></td></tr></table></P><P>
GDB then attempts to read the symbol table of <TT>`prog'</TT>.
GDB locates
the file by searching the directories listed in the command search
path.
If the file was compiled with debug information (option "-g"), source
files will be searched as well.
GDB locates
the source files by searching the directories listed in the directory search
path (see section <A HREF="gdb_5.html#SEC20">Your program's environment</A>).
If it fails
to find a file, it displays a message such as:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>prog: No such file or directory.
</FONT></pre></td></tr></table></P><P>
When this happens, add the appropriate directories to the search paths with
the GDB commands <CODE>path</CODE> and <CODE>dir</CODE>, and execute the
<CODE>target</CODE> command again.
</P><P>
<A NAME="Sparclet Connection"></A>
<HR SIZE="6">
<A NAME="SEC174"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC173"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC175"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC175"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC172"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.12.2 Connecting to Sparclet </H4>
<!--docid::SEC174::-->
<P>
The GDB command <CODE>target</CODE> lets you connect to a Sparclet target.
To connect to a target on serial port "<CODE>ttya</CODE>", type:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(gdbslet) target sparclet /dev/ttya
Remote target sparclet connected to /dev/ttya
main () at ../prog.c:3
</FONT></pre></td></tr></table></P><P>
GDB displays messages like these:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>Connected to ttya.
</FONT></pre></td></tr></table></P><P>
<A NAME="Sparclet Download"></A>
<HR SIZE="6">
<A NAME="SEC175"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC174"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC176"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC176"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC172"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.12.3 Sparclet download </H4>
<!--docid::SEC175::-->
<P>
<A NAME="IDX782"></A>
Once connected to the Sparclet target,
you can use the GDB
<CODE>load</CODE> command to download the file from the host to the target.
The file name and load offset should be given as arguments to the <CODE>load</CODE>
command.
Since the file format is aout, the program must be loaded to the starting
address. You can use <CODE>objdump</CODE> to find out what this value is. The load
offset is an offset which is added to the VMA (virtual memory address)
of each of the file's sections.
For instance, if the program
<TT>`prog'</TT> was linked to text address 0x1201000, with data at 0x12010160
and bss at 0x12010170, in GDB, type:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(gdbslet) load prog 0x12010000
Loading section .text, size 0xdb0 vma 0x12010000
</FONT></pre></td></tr></table></P><P>
If the code is loaded at a different address then what the program was linked
to, you may need to use the <CODE>section</CODE> and <CODE>add-symbol-file</CODE> commands
to tell GDB where to map the symbol table.
</P><P>
<A NAME="Sparclet Execution"></A>
<HR SIZE="6">
<A NAME="SEC176"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC175"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC172"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H4> 18.3.12.4 Running and debugging </H4>
<!--docid::SEC176::-->
<P>
<A NAME="IDX783"></A>
You can now begin debugging the task using GDB's execution control
commands, <CODE>b</CODE>, <CODE>step</CODE>, <CODE>run</CODE>, etc. See the GDB
manual for the list of commands.
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>(gdbslet) b main
Breakpoint 1 at 0x12010000: file prog.c, line 3.
(gdbslet) run
Starting program: prog
Breakpoint 1, main (argc=1, argv=0xeffff21c) at prog.c:3
3 char *symarg = 0;
(gdbslet) step
4 char *execarg = "hello!";
(gdbslet)
</FONT></pre></td></tr></table></P><P>
<A NAME="Sparclite"></A>
<HR SIZE="6">
<A NAME="SEC177"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC176"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC178"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.13 Fujitsu Sparclite </H3>
<!--docid::SEC177::-->
<P>
<DL COMPACT>
<A NAME="IDX784"></A>
<DT><CODE>target sparclite <VAR>dev</VAR></CODE>
<DD>Fujitsu sparclite boards, used only for the purpose of loading.
You must use an additional command to debug the program.
For example: target remote <VAR>dev</VAR> using GDB standard
remote protocol.
<P>
</DL>
<P>
<A NAME="ST2000"></A>
<HR SIZE="6">
<A NAME="SEC178"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC177"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC179"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.14 Tandem ST2000 </H3>
<!--docid::SEC178::-->
<P>
GDB may be used with a Tandem ST2000 phone switch, running Tandem's
STDBUG protocol.
</P><P>
To connect your ST2000 to the host system, see the manufacturer's
manual. Once the ST2000 is physically attached, you can run:
</P><P>
<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre>target st2000 <VAR>dev</VAR> <VAR>speed</VAR>
</FONT></pre></td></tr></table></P><P>
to establish it as your debugging environment. <VAR>dev</VAR> is normally
the name of a serial device, such as <TT>`/dev/ttya'</TT>, connected to the
ST2000 via a serial line. You can instead specify <VAR>dev</VAR> as a TCP
connection (for example, to a serial line attached via a terminal
concentrator) using the syntax <CODE><VAR>hostname</VAR>:<VAR>portnumber</VAR></CODE>.
</P><P>
The <CODE>load</CODE> and <CODE>attach</CODE> commands are <EM>not</EM> defined for
this target; you must load your program into the ST2000 as you normally
would for standalone operation. GDB reads debugging information
(such as symbols) from a separate, debugging version of the program
available on your host computer.
</P><P>
<A NAME="IDX785"></A>
These auxiliary GDB commands are available to help you with the ST2000
environment:
</P><P>
<DL COMPACT>
<DT><CODE>st2000 <VAR>command</VAR></CODE>
<DD><A NAME="IDX786"></A>
<A NAME="IDX787"></A>
<A NAME="IDX788"></A>
Send a <VAR>command</VAR> to the STDBUG monitor. See the manufacturer's
manual for available commands.
<P>
<DT><CODE>connect</CODE>
<DD><A NAME="IDX789"></A>
Connect the controlling terminal to the STDBUG command monitor. When
you are done interacting with STDBUG, typing either of two character
sequences gets you back to the GDB command prompt:
<KBD><KBD>RET</KBD>~.</KBD> (Return, followed by tilde and period) or
<KBD><KBD>RET</KBD>~<KBD>C-d</KBD></KBD> (Return, followed by tilde and control-D).
</DL>
<P>
<A NAME="Z8000"></A>
<HR SIZE="6">
<A NAME="SEC179"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC178"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC156"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC154"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.3.15 Zilog Z8000 </H3>
<!--docid::SEC179::-->
<P>
<A NAME="IDX790"></A>
<A NAME="IDX791"></A>
<A NAME="IDX792"></A>
</P><P>
When configured for debugging Zilog Z8000 targets, GDB includes
a Z8000 simulator.
</P><P>
For the Z8000 family, <SAMP>`target sim'</SAMP> simulates either the Z8002 (the
unsegmented variant of the Z8000 architecture) or the Z8001 (the
segmented variant). The simulator recognizes which architecture is
appropriate by inspecting the object code.
</P><P>
<DL COMPACT>
<DT><CODE>target sim <VAR>args</VAR></CODE>
<DD><A NAME="IDX793"></A>
<A NAME="IDX794"></A>
Debug programs on a simulated CPU. If the simulator supports setup
options, specify them via <VAR>args</VAR>.
</DL>
<P>
After specifying this target, you can debug programs for the simulated
CPU in the same style as programs for your host computer; use the
<CODE>file</CODE> command to load a new program image, the <CODE>run</CODE> command
to run your program, and so on.
</P><P>
As well as making available all the usual machine registers
(see section <A HREF="gdb_9.html#SEC63">Registers</A>), the Z8000 simulator provides three
additional items of information as specially named registers:
</P><P>
<DL COMPACT>
<DT><CODE>cycles</CODE>
<DD>Counts clock-ticks in the simulator.
<P>
<DT><CODE>insts</CODE>
<DD>Counts instructions run in the simulator.
<P>
<DT><CODE>time</CODE>
<DD>Execution time in 60ths of a second.
<P>
</DL>
<P>
You can refer to these values in GDB expressions with the usual
conventions; for example, <SAMP>`b fputc if $cycles&#62;5000'</SAMP> sets a
conditional breakpoint that suspends only after at least 5000
simulated clock ticks.
</P><P>
<A NAME="Architectures"></A>
<HR SIZE="6">
<A NAME="SEC180"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC179"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC181"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H2> 18.4 Architectures </H2>
<!--docid::SEC180::-->
<P>
This section describes characteristics of architectures that affect
all uses of GDB with the architecture, both native and cross.
</P><P>
<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC181">18.4.1 A29K</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC182">18.4.2 Alpha</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="gdb_19.html#SEC183">18.4.3 MIPS</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP"></TD></TR>
</TABLE></BLOCKQUOTE>
<P>
<A NAME="A29K"></A>
<HR SIZE="6">
<A NAME="SEC181"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC182"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.4.1 A29K </H3>
<!--docid::SEC181::-->
<P>
<DL COMPACT>
<A NAME="IDX795"></A>
<A NAME="IDX796"></A>
<A NAME="IDX797"></A>
<DT><CODE>set rstack_high_address <VAR>address</VAR></CODE>
<DD>On AMD 29000 family processors, registers are saved in a separate
<EM>register stack</EM>. There is no way for GDB to determine the
extent of this stack. Normally, GDB just assumes that the
stack is "large enough". This may result in GDB referencing
memory locations that do not exist. If necessary, you can get around
this problem by specifying the ending address of the register stack with
the <CODE>set rstack_high_address</CODE> command. The argument should be an
address, which you probably want to precede with <SAMP>`0x'</SAMP> to specify in
hexadecimal.
<P>
<A NAME="IDX798"></A>
<DT><CODE>show rstack_high_address</CODE>
<DD>Display the current limit of the register stack, on AMD 29000 family
processors.
<P>
</DL>
<P>
<A NAME="Alpha"></A>
<HR SIZE="6">
<A NAME="SEC182"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC181"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC183"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC183"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.4.2 Alpha </H3>
<!--docid::SEC182::-->
<P>
See the following section.
</P><P>
<A NAME="MIPS"></A>
<HR SIZE="6">
<A NAME="SEC183"></A>
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC182"> &lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC180"> Up </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<H3> 18.4.3 MIPS </H3>
<!--docid::SEC183::-->
<P>
<A NAME="IDX799"></A>
<A NAME="IDX800"></A>
<A NAME="IDX801"></A>
<A NAME="IDX802"></A>
Alpha- and MIPS-based computers use an unusual stack frame, which
sometimes requires GDB to search backward in the object code to
find the beginning of a function.
</P><P>
<A NAME="IDX803"></A>
To improve response time (especially for embedded applications, where
GDB may be restricted to a slow serial line for this search)
you may want to limit the size of this search, using one of these
commands:
</P><P>
<DL COMPACT>
<A NAME="IDX804"></A>
<DT><CODE>set heuristic-fence-post <VAR>limit</VAR></CODE>
<DD>Restrict GDB to examining at most <VAR>limit</VAR> bytes in its
search for the beginning of a function. A value of <VAR>0</VAR> (the
default) means there is no limit. However, except for <VAR>0</VAR>, the
larger the limit the more bytes <CODE>heuristic-fence-post</CODE> must search
and therefore the longer it takes to run.
<P>
<DT><CODE>show heuristic-fence-post</CODE>
<DD>Display the current limit.
</DL>
<P>
These commands are available <EM>only</EM> when GDB is configured
for debugging programs on Alpha or MIPS processors.
</P><P>
<A NAME="Controlling GDB"></A>
<HR SIZE="6">
<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_19.html#SEC143"> &lt;&lt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_20.html#SEC184"> &gt;&gt; </A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb.html#SEC_Top">Top</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_toc.html#SEC_Contents">Contents</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_35.html#SEC643">Index</A>]</TD>
<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="gdb_abt.html#SEC_About"> ? </A>]</TD>
</TR></TABLE>
<BR>
<FONT SIZE="-1">
<address>
<p>Please send FSF &amp; GNU inquiries &amp; questions to <a
href="mailto:gnu@gnu.org">gnu@gnu.org</a>. There are also <a
href="http://www.gnu.org/home.html#ContactInfo">other ways to
contact</a> the FSF.</p>
<p>These pages are maintained by <a
href="http://www.gnu.org/software/gdb/">the GDB developers</a>.</p>
<p>Copyright Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111, USA.</p>
<p>Verbatim copying and distribution of this entire article is
permitted in any medium, provided this notice is preserved.</p>
</address>
This document was generated
by <I>GDB Administrator</I> on <I>November, 11 2002</I>
using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
"><I>texi2html</I></A>
</BODY>
</HTML>