您好,欢迎光临本网站![请登录][注册会员]  
文件名称: CGDB Manual 0.6.8.pdf
  所属分类: C
  开发工具:
  文件大小: 173kb
  下载次数: 0
  上传时间: 2019-07-20
  提 供 者: u0106*****
 详细说明:CGDB manualCGDB Manual o.6.8 http://cgdb.github.io/docs/cgdb.html implementation Those wanting to develop other interfaces to gDB are welcome to use libtgdb as the basis for their program. Many of the headaches of parsing GDBs output and annotations can be avoided by using it Some features offered by CgDB are Syntax-highlighted source window Visual breakpoint setting Keyboard shortcuts for common functions Searching source window (using regexp) Next: Understanding CgDB, Previous: Summary, Up: Top [ContentslIndex 1 Getting In and Out of CGDB This chapter discusses how to start CGDB, and how to get out of it. The essentials are e type 'cgdb' to start CGDB e type quit or c-din the gDB window to exit. type quit in the source window to exit. This even works if GDB is currently hanging, or operating a long command Next: Controlling CGDB, Previous: Invocation, Up: Top [Contents][Index] 2 Understanding the core concepts of CGDB The CGDB user interface currently consists of two windows and a status bar The source window is currently on the top and the gDB window is on the bottom. The status bar currently separates the two windows The interface has several modes depending on which window is focused CGDB mode is when the source window is focused gdb mode is when the GDB window is focused and tty mode is when the tty window is focused Beginning with CGDB version 1.0, the windows are movable, and the user will be able to create as many or as few that is desired. Currently however, all of my time is spent developing the interface between CgDB and gdB Once this is complete, the UI of CGDB will become much more polished. If you are a ncurses developer, and have spare time to work on this task, please contact me Source window. Understanding the source window GDB Window Understanding the gDB window. 3of36 2016年08月06日20:15 CGDB Manual o.6.8 http://cgdb.github.io/docs/cgdb.html File dialog Window: Understanding the file dialog window TTY Window Understanding the TTy window. Status bar Understanding the status bar. Switching Windows: Switching between windows Next: GDB Window, Up: Understanding CGDB [Contents][Index] 2.1 Understanding the source window The source window is the window that provides you a view of the source code that the debugged program is made up of. It will display to the user a single source file at a time. While the user is debugging, via next and step, CGDB will update the source file and line number to keep you informed as to where GDB is debugging CGDB has several features that make debugging easier than using plain old GDB. One feature you will notice right away while debugging a C, C++ or ADA program, is that the source files are syntax highlighted. This allows the user to easily navigate through the source file to look for certain places in the source code. If you would like to see another source language highlighted, contact us. To understanding how to navigate through the source window look at the commands in Cdb mode In addition to showing the source code, CGDB also displays to the user the currently executing line. The line number will be highlighted green,to represent that the particular line, is the current line being debugged by GDB Also, CGDB will display an arrow extending from the line number, to the source line. You can configure what type of arrow CGDB uses with the: set arrowstyle configuration option. By default, the short arrow is used. However, my personal favorite is the long arrow As you navigate through the source window, the current line the cursor is on will be highlighted white. This simply helps you keep track of where you are in the file Also, you can set or delete breakpoints in CgDB from the source window Simply navigate to the line that you are interested in setting a breakpoint, and hit the space bar. This will set a breakpoint on the line if one did not already exist. The line number should turn red to indicate that a breakpoint has been set. Hitting the space bar again will delete the breakpoint. If you disable the breakpoint, the line number will turn yellow, to represent the disabled breakpoint CGDB also supports regular expression searching within the source window If you type /or you can search in the source window for a string of interest. The c library regular expression functions are used to perform this search, which honors things like'xor'+ 4of36 2016年08月06日20:15 CGDB Manual o.6.8 http://cgdb.github.io/docs/cgdb.html The full list of commands that are available in the source window is in CgdB Mode Next File Dialog Window, Previous: Source Window, Up: Understanding CGDB [Contents[Index 2.2 Understanding the GDB window. The gDb window is how CgDb allows the user to interface with the gnu debugger. If you wish to pass a command to GDB, simply type it into this window and gdb will receive the command. This interface is intended to be 100% identical to using gDB on a terminal There is a limited set of keys that can be typed into this window that CGDB interprets and handles, instead of sending to GDB. They are all available in GDB Mode CGDB attempts to buffer commands the same way they would be if you typed them at the terminal. So, if you type several commands before a single one finishes, they will each be run in order. There will be no way to stop these commands from being run besides from typing Ctrl-C, like you would at any normal terminal when working with GDB Next: TTY Window, Previous: GDB Window, Up: Understanding CgDB COntents[Index 2.3 Understanding the file dialog window. The file dialog window is available to help the user view and select which file they would like to view. It provides the user with a list of all the files that make up the program being debugged. If there are no files available, because there is no program being debugged or because there is no debug symbols, then the file dialog will not open and a message will be displayed at the status bar You can get to the file dialog by hitting o when you are at the source window Once you enter the file dialog, it is possible to leave it by hitting q. You can navigate the file dialog using the standard direction keys and you can even use regular expression to find your file. This can save a lot of time as the number o of files grow The full list of command s that are available in the source window is in File Dialo Mode Next Status Bar Previous: File Dialog window, Up: Understanding cgdB 5of36 2016年08月06日20:15 CGDB Manual o.6.8 http://cgdb.github.io/docs/cgdb.html [Contentsllindex] 2. 4 Understanding the try window The Try window is available to allow the user to pass input to the program being debugged. This window will act similar to the gdB window, except that the data you type will get sent to the program being debugged. See Sending Io to Inferior You will notice that the tty window has a terminal device between it and the program being debugged. So, if the program being debugged uses say readline, which allows command line editing the same interface will be provided via the Tty window as at the terminal. You can see the name of the terminal device in the tty status bar The full list of commands that are avallable in the source window is in tty Mode Sending i/o to the program being debugged can be confusing It is described better in Sending i/o to Inferior. Unless the IyO with the program being debugged is simple, I usually prefer starting the application on a separate terminal and attaching to it with CGDB Next: Switching Windows, Previous: TTY Window, Up: Understanding CgDB COntents[Index] 2.5 Understanding the status bar. The status bar is the general purpose way for CgDb to show the user which commands they are currently typing or report errors to the user when they occur. CGdB does not use popup's or other forms of iyo to alert the user of information or problems While cgdb is running, you can configure it with any of the commands that are valid in CGDB's configuration file. simply type: in the source window, and you will see the colon, and the rest of the command you type appear in the status bar. When you are finished typing the command that you are interested in, type enter. This will alert cgdb to execute the command. If at any point you would like to cancel the current command typed so far, type the cgdb mode key. This will put you back into CGDB mode. For a description of the cgdb mode key, see Switching Windows The full list of commands that are available in the source window is in Configuring cgdB Previous: Status Bar Up: Understanding CGDB [Contents[Index 6of36 2016年08月06日20:15 CGDB Manual o.6.8 http://cgdb.github.io/docs/cgdb.html 2.6 Switch between windows When CgDB is invoked, the interface is in GDB mode. A*at the right of the status bar indicates that input will be passed to gB. To change the focus to the source window, hit the Esc key. The cgdb mode key is the key that is responsible for switching the user into CGDB mode from a different mode The cgdb mode key is defaulted to the ESC key. To change this value, look at the configuration options for CGDB. See Configuring CGDB The interface is now in CGDB mode. To switch back into GDB mode, press i This syntax is based on the popular Unix text-editor, vi Next: Configuring CGDB, Previous: Understanding CGDB, Up: Top COntents [indexI 3 CGDB commands CGDB can be controlled in a variety of different ways. Each mode that CGDB is in acts differently. Currently CgDB implicitly changes modes depending on which window is active. The following information will help you determine what commands are accessible during which modes CGDB Mode: Commands available during CGDB mode GDB Mode Commands available during GDB mode File Dialog Mode: Commands available during the file dialog mode TTY Mode Commands available during tty mode Next: GDB Mode, Up: Controlling CGDB [Contents[Index] 3.1 Commands available during cgdb mode When you are in the source window, you are implicitly in CGDB mode. All of the below commands are available during this mode. This mode is primarily available for the user to view the current source file search it, or switch to a different mode cgabmodekey Puts the user into command mode. However, you are already in this mode. This is defaulted to the esc key. Puts the user into gdb mode 7of36 2016年08月06日20:15 CGDB Manual 0.6.8 http://cgdb.github.io/docs/cgdb.html Puts the user into tty mode Opens a window to give input to the debugged program Ctrl-t Opens a new tty for the debugged program up arrow Move up a line down arrow Move down a line h Left arrow Move left a line right arrow Move right a line Ctrl-b page up Move up a page Ctrl-u Move up 1/2 a page Ctrl-f page down Move down a page Ctrl-d Move down 1/2 a page gg Move to the top of file 8of36 2016年08月06日20:15 CGDB Manual 0.6.8 http://cgdb.github.io/docs/cgdb.html Move to the bottom of file search from current cursor position reverse search from current cursor position. next forward search next reverse search open the file dialog spacebar Sets a breakpoint at the current line number. Sets a temporary breakpoint at the current line number Shrink source window 1 line Grow source window 1 line Shrink source window 25%(or, shrink tty window 1 line, if visible) Grow source window 25%(or, grow tty window 1 line, if visible) Ctrl-l Clear and redraw the screen 9of36 2016年08月06日20:15 CGDB Manual 0.6.8 http://cgdb.github.io/docs/cgdb.html Send a run command to gdB Send a continue command to gdB Send a finish command to gdB F8 Send a next command to gdB Send a step command to GDB Next: File Dialog Mode, Previous: CGDB Mode, Up: Controlling CgDb Contents[Index 3.2 Commands available during gDB mode When in GDB mode, the user is mostly interested in working with the gDB console. That is, sending commands to gDb and receiving data back from GDB. Almost all data passed into this window is directly sent to readline and then to gdB It is important to understand that CgdB parses the keys entered in the gDB window and has the first chance at dealing with them. If it is interested in the keys, it will handle them. Below is a list of keys that Cgdb is interested ir. and does not pass along any further. cgdbmodekey Switch back to source window This is defaulted to the ESC key page up Move up a page page down Move down a page. F11 Go to the beginning of the gdb buffer 10of36 2016年08月06日20:15
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 相关搜索: CGDBManual0.6.8.pdf
 输入关键字,在本站1000多万海量源码库中尽情搜索: