📄 readme
字号:
Invalid configuration `i786v': machine `i786v' not recognized`config.sub' is also distributed in the GDB source directory(`gdb-4.7', for version 4.7).`configure' Options==================== Here is a summary of the `configure' options and arguments that aremost often useful for building GDB. `configure' also has several otheroptions not listed here. *note : (configure.info)What Configure Does,for a full explanation of `configure'. configure [--help] [--prefix=DIR] [--srcdir=PATH] [--norecursion] [--rm] [--target=TARGET] HOSTYou may introduce options with a single `-' rather than `--' if youprefer; but you may abbreviate option names if you use `--'.`--help' Display a quick summary of how to invoke `configure'.`-prefix=DIR' Configure the source to install programs and files under directory `DIR'.`--srcdir=PATH' *Warning: using this option requires GNU `make', or another `make' that implements the `VPATH' feature.* Use this option to make configurations in directories separate from the GDB source directories. Among other things, you can use this to build (or maintain) several configurations simultaneously, in separate directories. `configure' writes configuration specific files in the current directory, but arranges for them to use the source in the directory PATH. `configure' will create directories under the working directory in parallel to the source directories below PATH.`--norecursion' Configure only the directory level where `configure' is executed; do not propagate configuration to subdirectories.`--rm' Remove the configuration that the other arguments specify.`--target=TARGET' Configure GDB for cross-debugging programs running on the specified TARGET. Without this option, GDB is configured to debug programs that run on the same machine (HOST) as GDB itself. There is no convenient way to generate a list of all available targets.`HOST ...' Configure GDB to run on the specified HOST. There is no convenient way to generate a list of all available hosts.`configure' accepts other options, for compatibility with configuringother GNU tools recursively; but these are the only options that affectGDB or its supporting libraries.Languages other than C=======================GDB provides some support for debugging C++ progams. Partial Modula-2support is now in GDB. GDB should work with FORTRAN programs. (If youhave problems, please send a bug report; you may have to refer to someFORTRAN variables with a trailing underscore). I am not aware ofanyone who is working on getting gdb to use the syntax of any otherlanguage. Pascal programs which use sets, subranges, file variables,or nested functions will not currently work.Kernel debugging=================I have't done this myself so I can't really offer any advice.Remote debugging over serial lines works fine, but the kernel debuggingcode in here has not been tested in years. Van Jacobson hasbetter kernel debugging, but the UC lawyers won't let FSF have it.Remote debugging=================The files m68k-stub.c, i386-stub.c, and sparc-stub.c are examples ofremote stubs to be used with remote.c. They are designed to runstandalone on a 68k, 386, or SPARC cpu and communicate properly withthe remote.c stub over a serial line.The file rem-multi.shar contains a general stub that can probablyrun on various different flavors of unix to allow debugging over aserial line from one machine to another.Some working remote interfaces for talking to existing ROM monitorsare: remote-eb.c AMD 29000 "EBMON" remote-hms.c Hitachi Micro Systems H8/300 monitor remote-nindy.c Intel 960 "Nindy" remote-adapt.c AMD 29000 "Adapt" remote-mm.c AMD 29000 "minimon"Remote-vx.c and the vx-share subdirectory contain a remote interface for theVxWorks realtime kernel, which communicates over TCP using the SunRPC library. This would be a useful starting point for other remote-via-ethernet back ends.Reporting Bugs===============The correct address for reporting bugs found in gdb is"bug-gdb@prep.ai.mit.edu". Please email all bugs to that address.Please include the GDB version number (e.g. gdb-4.7), and howyou configured it (e.g. "sun4" or "mach386 host, i586-intel-synopsystarget").Known bugs: * If you run with a watchpoint enabled, breakpoints will become erratic and might not stop the program. Disabling or deleting the watchpoint will fix the problem. * Under Ultrix 4.2 (DECstation-3100), we have seen problems with backtraces after interrupting the inferior out of a read(). The problem is caused by ptrace() returning an incorrect value for register 30. As far as we can tell, this is a kernel problem. Any help with this would be greatly appreciated. * The IBM RS6000 (running AIX 3.1) has problems doing backtraces when stopped inside of library routines. It also reports incorrect values for arguments of functions under some circumstances. * Most SPARC versions of GDB report incorrect values of struct arguments to functions.GDB can produce warnings about symbols that it does not understand. Bydefault, these warnings are disabled. You can enable them by executing`set complaint 10' (which you can put in your ~/.gdbinit if you like).I recommend doing this if you are working on a compiler, assembler,linker, or gdb, since it will point out problems that you may be ableto fix. Warnings produced during symbol reading indicate some mismatchbetween the object file and GDB's symbol reading code. In many cases,it's a mismatch between the specs for the object file format, and whatthe compiler actually outputs or the debugger actually understands.If you port gdb to a new machine, please send the required changes tobug-gdb@prep.ai.mit.edu. There's lots of information about doing yourown port in the file gdb-4.7/gdb/doc/gdbint.texinfo, which you canprint out, or read with `info' (see the Makefile.in there). If yourchanges are more than a few lines, obtain and send in a copyrightassignment from gnu@prep.ai.mit.edu, as described in the section`Writing Code for GDB' below.X Windows versus GDB=====================xgdb is obsolete. We are not doing any development or support of it.There is an "xxgdb", which shows more promise, which was posted tocomp.sources.x.For those intersted in auto display of source and the availability ofan editor while debugging I suggest trying gdb-mode in gnu-emacs(Try typing M-x gdb RETURN). Comments on this mode are welcome.Writing Code for GDB=====================Documentation about GDB's internals is in the subdirectory doc, as`gdbint.texinfo'. In particular, there is a `cookbook' there on howto port GDB to a new machine. You can read it by hand, print itby using TeX and texinfo, or process it into an `info' file for usewith Emacs' info mode or the standalone `info' program.We appreciate having users contribute code that is of general use, butfor it to be included in future GDB releases it must be cleanlywritten. We do not want to include changes that will needlessly makefuture maintainance difficult. It is not much harder to do thingsright, and in the long term it is worth it to the GNU project, andprobably to you individually as well.If you make substantial changes, you'll have to file a copyrightassignment with the Free Software Foundation before we can produce arelease that includes your changes. Send mail requesting the copyrightassignment to gnu@prep.ai.mit.edu. Do this early, like before thechanges actually work, or even before you start them, because a manageror lawyer on your end will probably make this a slow process.Please code according to the GNU coding standards. If you do not havea copy, you can request one by sending mail to gnu@prep.ai.mit.edu.Please try to avoid making machine-specific changes tomachine-independent files. If this is unavoidable, put a hook in themachine-independent file which calls a (possibly) machine-dependentmacro (for example, the IGNORE_SYMBOL macro can be used for anysymbols which need to be ignored on a specific machine. CallingIGNORE_SYMBOL in dbxread.c is a lot cleaner than a maze of #ifdefined's). The machine-independent code should do whatever "most"machines want if the macro is not defined in param.h. Using #ifdefined can sometimes be OK (e.g. SET_STACK_LIMIT_HUGE) but should beconditionalized on a specific feature of an operating system (set intm.h or xm.h) rather than something like #if defined(vax) or #ifdefined(SYSV). If you use an #ifdef on some symbol that is definedin a header file (e.g. #ifdef TIOCSETP), *please* make sure that youhave #include'd the relevant header file in that module!There is a list of all known `feature-test macros' in gdbint.texinfo.Each such macro should be defined (or left undefined) in a host-dependent,target-dependent, or native-dependent include file. Not all of themacros are cleanly separated this way, yet. As you make changes, movethe code toward cleanliness.It is better to replace entire routines which may be system-specific,rather than put in a whole bunch of hooks which are probably not goingto be helpful for any purpose other than your changes. For example,if you want to modify dbxread.c to deal with DBX debugging symbolswhich are in COFF files rather than BSD a.out files, do somethingalong the lines of a macro GET_NEXT_SYMBOL, which could havedifferent definitions for COFF and a.out, rather than trying to putthe necessary changes throughout all the code in dbxread.c thatcurrently assumes BSD format.When generalizing GDB along a particular interface, please use anattribute-struct rather than inserting tests or switch statementseverywhere. For example, GDB has been generalized to handle multiplekinds of remote interfaces -- not by #ifdef's everywhere, but bydefining the "target_ops" structure and having a current target (aswell as a stack of targets below it, for memory references). Wheneversomething needs to be done that depends on which remote interface weare using, a flag in the current target_ops structure is tested (e.g.`target_has_stack'), or a function is called through a pointer in thecurrent target_ops structure. In this way, when a new remote interfaceis added, only one module needs to be touched -- the one that actuallyimplements the new remote interface. Other examples ofattribute-structs are BFD access to multiple kinds of object fileformats, or GDB's access to multiple source languages.Please avoid duplicating code. For example, in GDB 3.x all the stuffin infptrace.c was duplicated in *-dep.c, and so changing somethingwas very painful. In GDB 4.x, these have all been consolidatedinto infptrace.c. infptrace.c can deal with variations betweensystems the same way any system-independent file would (hooks, #ifdefined, etc.), and machines which are radically different don't needto use infptrace.c at all. The same was true of core_file_commandand exec_file_command.Debugging gdb with itself==========================If gdb is limping on your machine, this is the preferred way to get itfully functional. Be warned that in some ancient Unix systems, likeUltrix 4.0, a program can't be running in one process while it is beingdebugged in another. Rather than doing "./gdb ./gdb", which works onSuns and such, you can copy gdb to gdb2 and then do "./gdb ./gdb2".When you run gdb in the gdb source directory, it will read a ".gdbinit"file that sets up some simple things to make debugging gdb easier. The"info" command, when executed without a subcommand in a gdb beingdebugged by gdb, will pop you back up to the top level gdb. See.gdbinit for details.I strongly recommend printing out the reference card and using it.Send reference-card suggestions to bug-gdb@prep.ai.mit.edu, just like bugs.If you use emacs, you will probably want to do a "make TAGS" after youconfigure your distribution; this will put the machine dependentroutines for your local machine where they will be accessed first by aM-period.Also, make sure that you've either compiled gdb with your local cc, orhave run `fixincludes' if you are compiling with gcc.(this is for editing this file with GNU emacs)Local Variables:mode: textEnd:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -