⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 yolinux tutorial - gnu gdb debugger command cheat sheet.mht

📁 linux下c++编程的好文章
💻 MHT
📖 第 1 页 / 共 5 页
字号:
From: <Saved by Microsoft Internet Explorer 5>
Subject: YoLinux Tutorial - GNU GDB Debugger Command Cheat Sheet
Date: Wed, 4 Apr 2007 11:13:01 +0800
MIME-Version: 1.0
Content-Type: multipart/related;
	type="text/html";
	boundary="----=_NextPart_000_01B9_01C776AA.3574BF70"
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028

This is a multi-part message in MIME format.

------=_NextPart_000_01B9_01C776AA.3574BF70
Content-Type: text/html;
	charset="utf-8"
Content-Transfer-Encoding: quoted-printable
Content-Location: http://www.yolinux.com/TUTORIALS/GDB-Commands.html

=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>YoLinux Tutorial - GNU GDB Debugger Command Cheat =
Sheet</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dutf-8"><LINK=20
href=3D"http://www.yolinux.com/TUTORIALS/yolinux.css" type=3Dtext/css=20
rel=3DSTYLESHEET>
<META content=3D"gdb,gdb debugger,gdb commands,GNU gdb" name=3DKEYWORDS>
<META=20
content=3D"YoLinux Tutorials: GNU GDB Debugger Commands. Linux =
Information Portal includes informative tutorials and links to many =
Linux sites. The YoLinux portal covers topics from desktop to servers =
and from developers to users"=20
name=3DDESCRIPTION>
<META content=3D"Greg Ippolito" name=3Dauthor>
<META content=3D"MSHTML 6.00.2900.3059" name=3DGENERATOR></HEAD>
<BODY bgColor=3D#cccccc>
<HR SIZE=3D5>

<TABLE width=3D"100%" callpadding=3D"4">
  <TBODY>
  <TR>
    <TD vAlign=3Dtop><A href=3D"http://www.yolinux.com/"><IMG=20
      alt=3D"Yolinux.com Tutorial"=20
      =
src=3D"http://www.yolinux.com/TUTORIALS/images/YoLinux_Tutorial_logo.png"=
=20
      border=3Dnone></A> </TD>
    <TD vAlign=3Dtop>
      <H1>GNU GDB Debugger Command Cheat Sheet</H1>GDB Command cheat =
sheet:=20
      Command summaries.=20
      <P>
      <DIV align=3Dright><!-- BEGIN RICH-MEDIA BURST! CODE -->
      <SCRIPT language=3DJavaScript>=0A=
rnum=3DMath.round(Math.random() * 100000);=0A=
                                                                         =
       =0A=
document.write('<scr'+'ipt =
src=3D"http://www.burstnet.com/cgi-bin/ads/ad9427a.cgi/v=3D2.0S/sz=3D468x=
60A|728x90A/'+rnum+'/NI/RETURN-CODE/JS/"></scr'+'ipt>');=0A=
                                                                         =
       =0A=
</SCRIPT>
      <NOSCRIPT><A=20
      =
href=3D"http://www.burstnet.com/ads/ad9427a-map.cgi/ns/v=3D2.0S/sz=3D468x=
60A|728x90A/"=20
      target=3D_top><IMG alt=3D"Click Here"=20
      =
src=3D"http://www.burstnet.com/cgi-bin/ads/ad9427a.cgi/ns/v=3D2.0S/sz=3D4=
68x60A|728x90A/"=20
      border=3D0></A> </NOSCRIPT><!-- END BURST CODE =
--></DIV></TD></TR></TBODY></TABLE>
<P>
<HR SIZE=3D5>

<TABLE cellSpacing=3D1 cellPadding=3D4 width=3D"100%" bgColor=3D#000000 =
border=3D1>
  <TBODY>
  <TR bgColor=3D#cccccc>
    <TD vAlign=3Dtop width=3D160 bgColor=3D#c0c0c0>
      <P><FONT size=3D-1><B>Related YoLinux Tutorials:</B>=20
      <P>=C2=B0<A =
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialC++.html">C++=20
      Info, links</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialC++StringClass.html=
">C++=20
      String Class</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialC++STL.html">C++ =
STL=20
      vector, list</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialXemacs.html">Emacs =
and=20
      C/C++</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialAdvanced_vi.html">A=
dvanced=20
      VI</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/LinuxTutorialC++CGI.html">CGI =
in=20
      C++</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html">Clearcas=
e=20
      Commands</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/MicrosoftVisualC++Tips.html">MS/=
Visual=20
      C++ Practices</A>=20
      <P>=C2=B0<A=20
      =
href=3D"http://www.yolinux.com/TUTORIALS/C++MemoryCorruptionAndMemoryLeak=
s.html">C++=20
      Memory corruption and leaks</A>=20
      <P>=C2=B0<A =
href=3D"http://www.yolinux.com/TUTORIALS/index.html">YoLinux=20
      Tutorials Index</A> </FONT>
      <P>
      <HR>

      <P>
      <SCRIPT type=3Dtext/javascript><!--=0A=
google_ad_client =3D "pub-8567479315106986";=0A=
google_ad_width =3D 160;=0A=
google_ad_height =3D 600;=0A=
google_ad_format =3D "160x600_as";=0A=
google_ad_channel =3D"";=0A=
google_ad_type =3D "text";=0A=
google_color_border =3D ["336699","000000","6699CC","003366"];=0A=
google_color_bg =3D ["FFFFFF","F0F0F0","003366","003366"];=0A=
google_color_link =3D ["0000FF","0000FF","FFFFFF","FF6600"];=0A=
google_color_url =3D ["008000","008000","AECCEB","99CCFF"];=0A=
google_color_text =3D ["000000","000000","AECCEB","FFFFFF"];=0A=
//--></SCRIPT>

      <SCRIPT =
src=3D"http://pagead2.googlesyndication.com/pagead/show_ads.js"=20
      type=3Dtext/javascript>=0A=
</SCRIPT>

      <P>
      <HR>

      <P><A href=3D"http://yolinux.tradepub.com/">Free Information =
Technology=20
      Magazine Subscriptions and Document Downloads</A>=20
      <P>
      <HR>

      <P><A =
href=3D"http://yolinux.tradepub.com/?pt=3Dcat&amp;page=3DInfosoft">Free=20
      Information Technology <B>Software and Development</B> Magazine=20
      Subscriptions and Document Downloads</A>=20
      <P>
      <HR>

      <P></P></TD>
    <TD>
      <TABLE cellSpacing=3D0 cellPadding=3D2 width=3D"100%" border=3D0>
        <TBODY>
        <TR bgColor=3D#ffcc33>
          <TD><B><BIG>GDB Command Line Arguments:=20
      </BIG></B></TD></TR></TBODY></TABLE>
      <P>Starting GDB:=20
      <UL>
        <LI><TT>gdb <I>name-of-executable</I></TT>=20
        <LI><TT>gdb -e <I>name-of-executable</I> -c=20
        <I>name-of-core-file</I></TT>=20
        <LI><TT>gdb <I>name-of-executable</I> -pid =
<I>process-id</I></TT>=20
        <BR>(Use <TT>ps -auxw</TT> to list process id's.) </LI></UL>
      <P>Command line options: (version 6. Older versions use a single =
"-")=20
      <DL>
        <DD>
        <TABLE border=3D1>
          <TBODY>
          <TR bgColor=3D#c0c0c0>
            <TH>Option</TH>
            <TH>Description</TH></TR>
          <TR>
            <TD vAlign=3Dtop>--help<BR>-h</TD>
            <TD vAlign=3Dtop>List command line arguments</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--exec=3D<I>file-name</I><BR>-e =
<I>file-name</I></TD>
            <TD vAlign=3Dtop>Identify executable associated with core=20
file.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--core=3D<I>name-of-core-file</I><BR>-c=20
              <I>name-of-core-file</I></TD>
            <TD vAlign=3Dtop>Specify core file.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--command=3D<I>command-file</I><BR>-x=20
              <I>command-file</I></TD>
            <TD vAlign=3Dtop>File listing GDB commands to perform. Good =
for=20
              automating set-up.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--directory=3D<I>directory</I><BR>-d=20
            <I>directory</I></TD>
            <TD vAlign=3Dtop>Add directory to the path to search for =
source=20
              files.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--cd=3D<I>directory</I></TD>
            <TD vAlign=3Dtop>Run GDB using specified directory as the =
current=20
              working directory.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--nx<BR>-n</TD>
            <TD vAlign=3Dtop>Do not execute commands from =
<TT>~/.gdbinit</TT>=20
              initialization file. Default is to look at this file and =
execute=20
              the list of commands.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--batch -x <I>command-file</I></TD>
            <TD vAlign=3Dtop>Run in batch (not interactive) mode. =
Execute=20
              commands from file. Requires <TT>-x</TT> option.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--symbols=3D<I>file-name</I><BR>-s=20
<I>file-name</I></TD>
            <TD vAlign=3Dtop>Read symbol table from file file.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--write</TD>
            <TD vAlign=3Dtop>Enable writing into executable and core=20
files.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--quiet<BR>-q</TD>
            <TD vAlign=3Dtop>Do not print the introductory and copyright =

              messages.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--tty=3D<I>device</I></TD>
            <TD vAlign=3Dtop>Specify <I>device</I> for running program's =

              standard input and output.</TD></TR>
          <TR>
            <TD vAlign=3Dtop>--pid=3D<I>process-id</I><BR>-p=20
              <I>process-id</I><BR>-c <I>process-id</I></TD>
            <TD vAlign=3Dtop>Specify process ID number to attach=20

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -