URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [doc/] [gdb.info-4] - Rev 178
Go to most recent revision | Compare with Previous | Blame | View Log
This is gdb.info, produced by makeinfo version 4.8 from../.././gdb/doc/gdb.texinfo.INFO-DIR-SECTION Software developmentSTART-INFO-DIR-ENTRY* Gdb: (gdb). The GNU debugger.END-INFO-DIR-ENTRYThis file documents the GNU debugger GDB.This is the Ninth Edition, of `Debugging with GDB: the GNUSource-Level Debugger' for GDB Version 6.8.Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,1998,1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006Free Software Foundation, Inc.Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.1 orany later version published by the Free Software Foundation; with theInvariant Sections being "Free Software" and "Free Software Needs FreeDocumentation", with the Front-Cover Texts being "A GNU Manual," andwith the Back-Cover Texts as in (a) below.(a) The FSF's Back-Cover Text is: "You are free to copy and modifythis GNU Manual. Buying copies from GNU Press supports the FSF indeveloping GNU and promoting software freedom."File: gdb.info, Node: Bytecode Descriptions, Next: Using Agent Expressions, Prev: General Bytecode Design, Up: Agent ExpressionsE.2 Bytecode Descriptions=========================Each bytecode description has the following form:`add' (0x02): A B => A+BPop the top two stack items, A and B, as integers; push their sum,as an integer.In this example, `add' is the name of the bytecode, and `(0x02)' isthe one-byte value used to encode the bytecode, in hexadecimal. Thephrase "A B => A+B" shows the stack before and after the bytecodeexecutes. Beforehand, the stack must contain at least two values, Aand B; since the top of the stack is to the right, B is on the top ofthe stack, and A is underneath it. After execution, the bytecode willhave popped A and B from the stack, and replaced them with a singlevalue, A+B. There may be other values on the stack below those shown,but the bytecode affects only those shown.Here is another example:`const8' (0x22) N: => NPush the 8-bit integer constant N on the stack, without signextension.In this example, the bytecode `const8' takes an operand N directlyfrom the bytecode stream; the operand follows the `const8' bytecodeitself. We write any such operands immediately after the name of thebytecode, before the colon, and describe the exact encoding of theoperand in the bytecode stream in the body of the bytecode description.For the `const8' bytecode, there are no stack items given before the=>; this simply means that the bytecode consumes no values from thestack. If a bytecode consumes no values, or produces no values, thelist on either side of the => may be empty.If a value is written as A, B, or N, then the bytecode treats it asan integer. If a value is written is ADDR, then the bytecode treats itas an address.We do not fully describe the floating point operations here; althoughthis design can be extended in a clean way to handle floating pointvalues, they are not of immediate interest to the customer, so we avoiddescribing them, to save time.`float' (0x01): =>Prefix for floating-point bytecodes. Not implemented yet.`add' (0x02): A B => A+BPop two integers from the stack, and push their sum, as an integer.`sub' (0x03): A B => A-BPop two integers from the stack, subtract the top value from thenext-to-top value, and push the difference.`mul' (0x04): A B => A*BPop two integers from the stack, multiply them, and push theproduct on the stack. Note that, when one multiplies two N-bitnumbers yielding another N-bit number, it is irrelevant whether thenumbers are signed or not; the results are the same.`div_signed' (0x05): A B => A/BPop two signed integers from the stack; divide the next-to-topvalue by the top value, and push the quotient. If the divisor iszero, terminate with an error.`div_unsigned' (0x06): A B => A/BPop two unsigned integers from the stack; divide the next-to-topvalue by the top value, and push the quotient. If the divisor iszero, terminate with an error.`rem_signed' (0x07): A B => A MODULO BPop two signed integers from the stack; divide the next-to-topvalue by the top value, and push the remainder. If the divisor iszero, terminate with an error.`rem_unsigned' (0x08): A B => A MODULO BPop two unsigned integers from the stack; divide the next-to-topvalue by the top value, and push the remainder. If the divisor iszero, terminate with an error.`lsh' (0x09): A B => A<<BPop two integers from the stack; let A be the next-to-top value,and B be the top value. Shift A left by B bits, and push theresult.`rsh_signed' (0x0a): A B => `(signed)'A>>BPop two integers from the stack; let A be the next-to-top value,and B be the top value. Shift A right by B bits, inserting copiesof the top bit at the high end, and push the result.`rsh_unsigned' (0x0b): A B => A>>BPop two integers from the stack; let A be the next-to-top value,and B be the top value. Shift A right by B bits, inserting zerobits at the high end, and push the result.`log_not' (0x0e): A => !APop an integer from the stack; if it is zero, push the value one;otherwise, push the value zero.`bit_and' (0x0f): A B => A&BPop two integers from the stack, and push their bitwise `and'.`bit_or' (0x10): A B => A|BPop two integers from the stack, and push their bitwise `or'.`bit_xor' (0x11): A B => A^BPop two integers from the stack, and push their bitwiseexclusive-`or'.`bit_not' (0x12): A => ~APop an integer from the stack, and push its bitwise complement.`equal' (0x13): A B => A=BPop two integers from the stack; if they are equal, push the valueone; otherwise, push the value zero.`less_signed' (0x14): A B => A<BPop two signed integers from the stack; if the next-to-top valueis less than the top value, push the value one; otherwise, pushthe value zero.`less_unsigned' (0x15): A B => A<BPop two unsigned integers from the stack; if the next-to-top valueis less than the top value, push the value one; otherwise, pushthe value zero.`ext' (0x16) N: A => A, sign-extended from N bitsPop an unsigned value from the stack; treating it as an N-bittwos-complement value, extend it to full length. This means thatall bits to the left of bit N-1 (where the least significant bitis bit 0) are set to the value of bit N-1. Note that N may belarger than or equal to the width of the stack elements of thebytecode engine; in this case, the bytecode should have no effect.The number of source bits to preserve, N, is encoded as a singlebyte unsigned integer following the `ext' bytecode.`zero_ext' (0x2a) N: A => A, zero-extended from N bitsPop an unsigned value from the stack; zero all but the bottom Nbits. This means that all bits to the left of bit N-1 (where theleast significant bit is bit 0) are set to the value of bit N-1.The number of source bits to preserve, N, is encoded as a singlebyte unsigned integer following the `zero_ext' bytecode.`ref8' (0x17): ADDR => A`ref16' (0x18): ADDR => A`ref32' (0x19): ADDR => A`ref64' (0x1a): ADDR => APop an address ADDR from the stack. For bytecode `ref'N, fetch anN-bit value from ADDR, using the natural target endianness. Pushthe fetched value as an unsigned integer.Note that ADDR may not be aligned in any particular way; the`refN' bytecodes should operate correctly for any address.If attempting to access memory at ADDR would cause a processorexception of some sort, terminate with an error.`ref_float' (0x1b): ADDR => D`ref_double' (0x1c): ADDR => D`ref_long_double' (0x1d): ADDR => D`l_to_d' (0x1e): A => D`d_to_l' (0x1f): D => ANot implemented yet.`dup' (0x28): A => A APush another copy of the stack's top element.`swap' (0x2b): A B => B AExchange the top two items on the stack.`pop' (0x29): A =>Discard the top value on the stack.`if_goto' (0x20) OFFSET: A =>Pop an integer off the stack; if it is non-zero, branch to thegiven offset in the bytecode string. Otherwise, continue to thenext instruction in the bytecode stream. In other words, if A isnon-zero, set the `pc' register to `start' + OFFSET. Thus, anoffset of zero denotes the beginning of the expression.The OFFSET is stored as a sixteen-bit unsigned value, storedimmediately following the `if_goto' bytecode. It is always storedmost significant byte first, regardless of the target's normalendianness. The offset is not guaranteed to fall at any particularalignment within the bytecode stream; thus, on machines wherefetching a 16-bit on an unaligned address raises an exception, youshould fetch the offset one byte at a time.`goto' (0x21) OFFSET: =>Branch unconditionally to OFFSET; in other words, set the `pc'register to `start' + OFFSET.The offset is stored in the same way as for the `if_goto' bytecode.`const8' (0x22) N: => N`const16' (0x23) N: => N`const32' (0x24) N: => N`const64' (0x25) N: => NPush the integer constant N on the stack, without sign extension.To produce a small negative value, push a small twos-complementvalue, and then sign-extend it using the `ext' bytecode.The constant N is stored in the appropriate number of bytesfollowing the `const'B bytecode. The constant N is always storedmost significant byte first, regardless of the target's normalendianness. The constant is not guaranteed to fall at anyparticular alignment within the bytecode stream; thus, on machineswhere fetching a 16-bit on an unaligned address raises anexception, you should fetch N one byte at a time.`reg' (0x26) N: => APush the value of register number N, without sign extension. Theregisters are numbered following GDB's conventions.The register number N is encoded as a 16-bit unsigned integerimmediately following the `reg' bytecode. It is always stored mostsignificant byte first, regardless of the target's normalendianness. The register number is not guaranteed to fall at anyparticular alignment within the bytecode stream; thus, on machineswhere fetching a 16-bit on an unaligned address raises anexception, you should fetch the register number one byte at a time.`trace' (0x0c): ADDR SIZE =>Record the contents of the SIZE bytes at ADDR in a trace buffer,for later retrieval by GDB.`trace_quick' (0x0d) SIZE: ADDR => ADDRRecord the contents of the SIZE bytes at ADDR in a trace buffer,for later retrieval by GDB. SIZE is a single byte unsignedinteger following the `trace' opcode.This bytecode is equivalent to the sequence `dup const8 SIZEtrace', but we provide it anyway to save space in bytecode strings.`trace16' (0x30) SIZE: ADDR => ADDRIdentical to trace_quick, except that SIZE is a 16-bit big-endianunsigned integer, not a single byte. This should probably havebeen named `trace_quick16', for consistency.`end' (0x27): =>Stop executing bytecode; the result should be the top element ofthe stack. If the purpose of the expression was to compute anlvalue or a range of memory, then the next-to-top of the stack isthe lvalue's address, and the top of the stack is the lvalue'ssize, in bytes.File: gdb.info, Node: Using Agent Expressions, Next: Varying Target Capabilities, Prev: Bytecode Descriptions, Up: Agent ExpressionsE.3 Using Agent Expressions===========================Here is a sketch of a full non-stop debugging cycle, showing how agentexpressions fit into the process.* The user selects trace points in the program's code at which GDBshould collect data.* The user specifies expressions to evaluate at each trace point.These expressions may denote objects in memory, in which casethose objects' contents are recorded as the program runs, orcomputed values, in which case the values themselves are recorded.* GDB transmits the tracepoints and their associated expressions tothe GDB agent, running on the debugging target.* The agent arranges to be notified when a trace point is hit. Notethat, on some systems, the target operating system is completelyresponsible for collecting the data; see *Note Tracing onSymmetrix::.* When execution on the target reaches a trace point, the agentevaluates the expressions associated with that trace point, andrecords the resulting values and memory ranges.* Later, when the user selects a given trace event and inspects theobjects and expression values recorded, GDB talks to the agent toretrieve recorded data as necessary to meet the user's requests.If the user asks to see an object whose contents have not beenrecorded, GDB reports an error.File: gdb.info, Node: Varying Target Capabilities, Next: Tracing on Symmetrix, Prev: Using Agent Expressions, Up: Agent ExpressionsE.4 Varying Target Capabilities===============================Some targets don't support floating-point, and some would rather nothave to deal with `long long' operations. Also, different targets willhave different stack sizes, and different bytecode buffer lengths.Thus, GDB needs a way to ask the target about itself. We haven'tworked out the details yet, but in general, GDB should be able to sendthe target a packet asking it to describe itself. The reply should be apacket whose length is explicit, so we can add new information to thepacket in future revisions of the agent, without confusing old versionsof GDB, and it should contain a version number. It should contain atleast the following information:* whether floating point is supported* whether `long long' is supported* maximum acceptable size of bytecode stack* maximum acceptable length of bytecode expressions* which registers are actually available for collection* whether the target supports disabled tracepointsFile: gdb.info, Node: Tracing on Symmetrix, Next: Rationale, Prev: Varying Target Capabilities, Up: Agent ExpressionsE.5 Tracing on Symmetrix========================This section documents the API used by the GDB agent to collect data onSymmetrix systems.Cygnus originally implemented these tracing features to help EMCCorporation debug their Symmetrix high-availability disk drives. TheSymmetrix application code already includes substantial tracingfacilities; the GDB agent for the Symmetrix system uses those facilitiesfor its own data collection, via the API described here.-- Function: DTC_RESPONSE adbg_find_memory_in_frame (FRAME_DEF *FRAME,char *ADDRESS, char **BUFFER, unsigned int *SIZE)Search the trace frame FRAME for memory saved from ADDRESS. Ifthe memory is available, provide the address of the buffer holdingit; otherwise, provide the address of the next saved area.* If the memory at ADDRESS was saved in FRAME, set `*BUFFER' topoint to the buffer in which that memory was saved, set`*SIZE' to the number of bytes from ADDRESS that are saved at`*BUFFER', and return `OK_TARGET_RESPONSE'. (Clearly, inthis case, the function will always set `*SIZE' to a valuegreater than zero.)* If FRAME does not record any memory at ADDRESS, set `*SIZE'to the distance from ADDRESS to the start of the saved regionwith the lowest address higher than ADDRESS. If there is nomemory saved from any higher address, set `*SIZE' to zero.Return `NOT_FOUND_TARGET_RESPONSE'.These two possibilities allow the caller to either retrieve thedata, or walk the address space to the next saved area.This function allows the GDB agent to map the regions of memorysaved in a particular frame, and retrieve their contents efficiently.This function also provides a clean interface between the GDB agentand the Symmetrix tracing structures, making it easier to adapt the GDBagent to future versions of the Symmetrix system, and vice versa. Thisfunction searches all data saved in FRAME, whether the data is there atthe request of a bytecode expression, or because it falls in one of theformat's memory ranges, or because it was saved from the top of thestack. EMC can arbitrarily change and enhance the tracing mechanism,but as long as this function works properly, all collected memory isvisible to GDB.The function itself is straightforward to implement. A single passover the trace frame's stack area, memory ranges, and expression blockscan yield the address of the buffer (if the requested address wassaved), and also note the address of the next higher range of memory,to be returned when the search fails.As an example, suppose the trace frame `f' has saved sixteen bytesfrom address `0x8000' in a buffer at `0x1000', and thirty-two bytesfrom address `0xc000' in a buffer at `0x1010'. Here are some samplecalls, and the effect each would have:`adbg_find_memory_in_frame (f, (char*) 0x8000, &buffer, &size)'This would set `buffer' to `0x1000', set `size' to sixteen, andreturn `OK_TARGET_RESPONSE', since `f' saves sixteen bytes from`0x8000' at `0x1000'.`adbg_find_memory_in_frame (f, (char *) 0x8004, &buffer, &size)'This would set `buffer' to `0x1004', set `size' to twelve, andreturn `OK_TARGET_RESPONSE', since `f' saves the twelve bytes from`0x8004' starting four bytes into the buffer at `0x1000'. Thisshows that request addresses may fall in the middle of savedareas; the function should return the address and size of theremainder of the buffer.`adbg_find_memory_in_frame (f, (char *) 0x8100, &buffer, &size)'This would set `size' to `0x3f00' and return`NOT_FOUND_TARGET_RESPONSE', since there is no memory saved in `f'from the address `0x8100', and the next memory available is at`0x8100 + 0x3f00', or `0xc000'. This shows that request addressesmay fall outside of all saved memory ranges; the function shouldindicate the next saved area, if any.`adbg_find_memory_in_frame (f, (char *) 0x7000, &buffer, &size)'This would set `size' to `0x1000' and return`NOT_FOUND_TARGET_RESPONSE', since the next saved memory is at`0x7000 + 0x1000', or `0x8000'.`adbg_find_memory_in_frame (f, (char *) 0xf000, &buffer, &size)'This would set `size' to zero, and return`NOT_FOUND_TARGET_RESPONSE'. This shows how the function tells thecaller that no further memory ranges have been saved.As another example, here is a function which will print out theaddresses of all memory saved in the trace frame `frame' on theSymmetrix INLINES console:voidprint_frame_addresses (FRAME_DEF *frame){char *addr;char *buffer;unsigned long size;addr = 0;for (;;){/* Either find out how much memory we have here, or discoverwhere the next saved region is. */if (adbg_find_memory_in_frame (frame, addr, &buffer, &size)== OK_TARGET_RESPONSE)printp ("saved %x to %x\n", addr, addr + size);if (size == 0)break;addr += size;}}Note that there is not necessarily any connection between the orderin which the data is saved in the trace frame, and the order in which`adbg_find_memory_in_frame' will return those memory ranges. The codeabove will always print the saved memory regions in order of increasingaddress, while the underlying frame structure might store the data in arandom order.[[This section should cover the rest of the Symmetrix functions thestub relies upon, too.]]File: gdb.info, Node: Rationale, Prev: Tracing on Symmetrix, Up: Agent ExpressionsE.6 Rationale=============Some of the design decisions apparent above are arguable.What about stack overflow/underflow?GDB should be able to query the target to discover its stack size.Given that information, GDB can determine at translation timewhether a given expression will overflow the stack. But this specisn't about what kinds of error-checking GDB ought to do.Why are you doing everything in LONGEST?Speed isn't important, but agent code size is; using LONGESTbrings in a bunch of support code to do things like division, etc.So this is a serious concern.First, note that you don't need different bytecodes for differentoperand sizes. You can generate code without _knowing_ how big thestack elements actually are on the target. If the target onlysupports 32-bit ints, and you don't send any 64-bit bytecodes,everything just works. The observation here is that the MIPS andthe Alpha have only fixed-size registers, and you can still getC's semantics even though most instructions only operate onfull-sized words. You just need to make sure everything isproperly sign-extended at the right times. So there is no needfor 32- and 64-bit variants of the bytecodes. Just implementeverything using the largest size you support.GDB should certainly check to see what sizes the target supports,so the user can get an error earlier, rather than later. But thisinformation is not necessary for correctness.Why don't you have `>' or `<=' operators?I want to keep the interpreter small, and we don't need them. Wecan combine the `less_' opcodes with `log_not', and swap the orderof the operands, yielding all four asymmetrical comparisonoperators. For example, `(x <= y)' is `! (x > y)', which is `! (y< x)'.Why do you have `log_not'?Why do you have `ext'?Why do you have `zero_ext'?These are all easily synthesized from other instructions, but Iexpect them to be used frequently, and they're simple, so Iinclude them to keep bytecode strings short.`log_not' is equivalent to `const8 0 equal'; it's used in half therelational operators.`ext N' is equivalent to `const8 S-N lsh const8 S-N rsh_signed',where S is the size of the stack elements; it follows `refM' andREG bytecodes when the value should be signed. See the nextbulleted item.`zero_ext N' is equivalent to `constM MASK log_and'; it's usedwhenever we push the value of a register, because we can't assumethe upper bits of the register aren't garbage.Why not have sign-extending variants of the `ref' operators?Because that would double the number of `ref' operators, and weneed the `ext' bytecode anyway for accessing bitfields.Why not have constant-address variants of the `ref' operators?Because that would double the number of `ref' operators again, and`const32 ADDRESS ref32' is only one byte longer.Why do the `refN' operators have to support unaligned fetches?GDB will generate bytecode that fetches multi-byte values atunaligned addresses whenever the executable's debugginginformation tells it to. Furthermore, GDB does not know the valuethe pointer will have when GDB generates the bytecode, so itcannot determine whether a particular fetch will be aligned or not.In particular, structure bitfields may be several bytes long, butfollow no alignment rules; members of packed structures are notnecessarily aligned either.In general, there are many cases where unaligned references occurin correct C code, either at the programmer's explicit request, orat the compiler's discretion. Thus, it is simpler to make the GDBagent bytecodes work correctly in all circumstances than to makeGDB guess in each case whether the compiler did the usual thing.Why are there no side-effecting operators?Because our current client doesn't want them? That's a cheapanswer. I think the real answer is that I'm afraid ofimplementing function calls. We should re-visit this issue afterthe present contract is delivered.Why aren't the `goto' ops PC-relative?The interpreter has the base address around anyway for PC boundschecking, and it seemed simpler.Why is there only one offset size for the `goto' ops?Offsets are currently sixteen bits. I'm not happy with thissituation either:Suppose we have multiple branch ops with different offset sizes.As I generate code left-to-right, all my jumps are forward jumps(there are no loops in expressions), so I never know the targetwhen I emit the jump opcode. Thus, I have to either always assumethe largest offset size, or do jump relaxation on the code after Igenerate it, which seems like a big waste of time.I can imagine a reasonable expression being longer than 256 bytes.I can't imagine one being longer than 64k. Thus, we need 16-bitoffsets. This kind of reasoning is so bogus, but relaxation ispathetic.The other approach would be to generate code right-to-left. ThenI'd always know my offset size. That might be fun.Where is the function call bytecode?When we add side-effects, we should add this.Why does the `reg' bytecode take a 16-bit register number?Intel's IA-64 architecture has 128 general-purpose registers, and128 floating-point registers, and I'm sure it has some randomcontrol registers.Why do we need `trace' and `trace_quick'?Because GDB needs to record all the memory contents and registersan expression touches. If the user wants to evaluate an expression`x->y->z', the agent must record the values of `x' and `x->y' aswell as the value of `x->y->z'.Don't the `trace' bytecodes make the interpreter less general?They do mean that the interpreter contains special-purpose code,but that doesn't mean the interpreter can only be used for thatpurpose. If an expression doesn't use the `trace' bytecodes, theydon't get in its way.Why doesn't `trace_quick' consume its arguments the way everything else does?In general, you do want your operators to consume their arguments;it's consistent, and generally reduces the amount of stackrearrangement necessary. However, `trace_quick' is a kludge tosave space; it only exists so we needn't write `dup const8 SIZEtrace' before every memory reference. Therefore, it's okay for itnot to consume its arguments; it's meant for a specific context inwhich we know exactly what it should do with the stack. If we'regoing to have a kludge, it should be an effective kludge.Why does `trace16' exist?That opcode was added by the customer that contracted Cygnus forthe data tracing work. I personally think it is unnecessary;objects that large will be quite rare, so it is okay to use `dupconst16 SIZE trace' in those cases.Whatever we decide to do with `trace16', we should at least leaveopcode 0x30 reserved, to remain compatible with the customer whoadded it.File: gdb.info, Node: Target Descriptions, Next: Copying, Prev: Agent Expressions, Up: TopAppendix F Target Descriptions*******************************Warning:* target descriptions are still under active development, andthe contents and format may change between GDB releases. The format isexpected to stabilize in the future.One of the challenges of using GDB to debug embedded systems is thatthere are so many minor variants of each processor architecture in use.It is common practice for vendors to start with a standard processorcore -- ARM, PowerPC, or MIPS, for example -- and then make changes toadapt it to a particular market niche. Some architectures havehundreds of variants, available from dozens of vendors. This leads toa number of problems:* With so many different customized processors, it is difficult forthe GDB maintainers to keep up with the changes.* Since individual variants may have short lifetimes or limitedaudiences, it may not be worthwhile to carry information aboutevery variant in the GDB source tree.* When GDB does support the architecture of the embedded system athand, the task of finding the correct architecture name to give the`set architecture' command can be error-prone.To address these problems, the GDB remote protocol allows a targetsystem to not only identify itself to GDB, but to actually describe itsown features. This lets GDB support processor variants it has neverseen before -- to the extent that the descriptions are accurate, andthat GDB understands them.GDB must be linked with the Expat library to support XML targetdescriptions. *Note Expat::.* Menu:* Retrieving Descriptions:: How descriptions are fetched from a target.* Target Description Format:: The contents of a target description.* Predefined Target Types:: Standard types available for targetdescriptions.* Standard Target Features:: Features GDB knows about.File: gdb.info, Node: Retrieving Descriptions, Next: Target Description Format, Up: Target DescriptionsF.1 Retrieving Descriptions===========================Target descriptions can be read from the target automatically, orspecified by the user manually. The default behavior is to read thedescription from the target. GDB retrieves it via the remote protocolusing `qXfer' requests (*note qXfer: General Query Packets.). TheANNEX in the `qXfer' packet will be `target.xml'. The contents of the`target.xml' annex are an XML document, of the form described in *NoteTarget Description Format::.Alternatively, you can specify a file to read for the targetdescription. If a file is set, the target will not be queried. Thecommands to specify a file are:`set tdesc filename PATH'Read the target description from PATH.`unset tdesc filename'Do not read the XML target description from a file. GDB will usethe description supplied by the current target.`show tdesc filename'Show the filename to read for a target description, if any.File: gdb.info, Node: Target Description Format, Next: Predefined Target Types, Prev: Retrieving Descriptions, Up: Target DescriptionsF.2 Target Description Format=============================A target description annex is an XML (http://www.w3.org/XML/) documentwhich complies with the Document Type Definition provided in the GDBsources in `gdb/features/gdb-target.dtd'. This means you can usegenerally available tools like `xmllint' to check that your featuredescriptions are well-formed and valid. However, to help peopleunfamiliar with XML write descriptions for their targets, we alsodescribe the grammar here.Target descriptions can identify the architecture of the remotetarget and (for some architectures) provide information about customregister sets. GDB can use this information to autoconfigure for yourtarget, or to warn you if you connect to an unsupported target.Here is a simple target description:<target version="1.0"><architecture>i386:x86-64</architecture></target>This minimal description only says that the target uses the x86-64architecture.A target description has the following overall form, with [ ] markingoptional elements and ... marking repeatable elements. The elementsare explained further below.<?xml version="1.0"?><!DOCTYPE target SYSTEM "gdb-target.dtd"><target version="1.0">[ARCHITECTURE][FEATURE...]</target>The description is generally insensitive to whitespace and line breaks,under the usual common-sense rules. The XML version declaration anddocument type declaration can generally be omitted (GDB does notrequire them), but specifying them may be useful for XML validationtools. The `version' attribute for `<target>' may also be omitted, butwe recommend including it; if future versions of GDB use an incompatiblerevision of `gdb-target.dtd', they will detect and report the versionmismatch.F.2.1 Inclusion---------------It can sometimes be valuable to split a target description up intoseveral different annexes, either for organizational purposes, or toshare files between different possible target descriptions. You candivide a description into multiple files by replacing any element ofthe target description with an inclusion directive of the form:<xi:include href="DOCUMENT"/>When GDB encounters an element of this form, it will retrieve the namedXML DOCUMENT, and replace the inclusion directive with the contents ofthat document. If the current description was read using `qXfer', thenso will be the included document; DOCUMENT will be interpreted as thename of an annex. If the current description was read from a file, GDBwill look for DOCUMENT as a file in the same directory where it foundthe original description.F.2.2 Architecture------------------An `<architecture>' element has this form:<architecture>ARCH</architecture>ARCH is an architecture name from the same selection accepted by`set architecture' (*note Specifying a Debugging Target: Targets.).F.2.3 Features--------------Each `<feature>' describes some logical portion of the target system.Features are currently used to describe available CPU registers and thetypes of their contents. A `<feature>' element has this form:<feature name="NAME">[TYPE...]REG...</feature>Each feature's name should be unique within the description. The nameof a feature does not matter unless GDB has some special knowledge ofthe contents of that feature; if it does, the feature should have itsstandard name. *Note Standard Target Features::.F.2.4 Types-----------Any register's value is a collection of bits which GDB must interpret.The default interpretation is a two's complement integer, but othertypes can be requested by name in the register description. Somepredefined types are provided by GDB (*note Predefined Target Types::),and the description can define additional composite types.Each type element must have an `id' attribute, which gives a unique(within the containing `<feature>') name to the type. Types must bedefined before they are used.Some targets offer vector registers, which can be treated as arraysof scalar elements. These types are written as `<vector>' elements,specifying the array element type, TYPE, and the number of elements,COUNT:<vector id="ID" type="TYPE" count="COUNT"/>If a register's value is usefully viewed in multiple ways, define itwith a union type containing the useful representations. The `<union>'element contains one or more `<field>' elements, each of which has aNAME and a TYPE:<union id="ID"><field name="NAME" type="TYPE"/>...</union>F.2.5 Registers---------------Each register is represented as an element with this form:<reg name="NAME"bitsize="SIZE"[regnum="NUM"][save-restore="SAVE-RESTORE"][type="TYPE"][group="GROUP"]/>The components are as follows:NAMEThe register's name; it must be unique within the targetdescription.BITSIZEThe register's size, in bits.REGNUMThe register's number. If omitted, a register's number is onegreater than that of the previous register (either in the currentfeature or in a preceeding feature); the first register in thetarget description defaults to zero. This register number is usedto read or write the register; e.g. it is used in the remote `p'and `P' packets, and registers appear in the `g' and `G' packetsin order of increasing register number.SAVE-RESTOREWhether the register should be preserved across inferior functioncalls; this must be either `yes' or `no'. The default is `yes',which is appropriate for most registers except for some systemcontrol registers; this is not related to the target's ABI.TYPEThe type of the register. TYPE may be a predefined type, a typedefined in the current feature, or one of the special types `int'and `float'. `int' is an integer type of the correct size forBITSIZE, and `float' is a floating point type (in thearchitecture's normal floating point format) of the correct sizefor BITSIZE. The default is `int'.GROUPThe register group to which this register belongs. GROUP must beeither `general', `float', or `vector'. If no GROUP is specified,GDB will not display the register in `info registers'.File: gdb.info, Node: Predefined Target Types, Next: Standard Target Features, Prev: Target Description Format, Up: Target DescriptionsF.3 Predefined Target Types===========================Type definitions in the self-description can build up composite typesfrom basic building blocks, but can not define fundamental types.Instead, standard identifiers are provided by GDB for the fundamentaltypes. The currently supported types are:`int8'`int16'`int32'`int64'`int128'Signed integer types holding the specified number of bits.`uint8'`uint16'`uint32'`uint64'`uint128'Unsigned integer types holding the specified number of bits.`code_ptr'`data_ptr'Pointers to unspecified code and data. The program counter andany dedicated return address register may be marked as codepointers; printing a code pointer converts it into a symbolicaddress. The stack pointer and any dedicated address registersmay be marked as data pointers.`ieee_single'Single precision IEEE floating point.`ieee_double'Double precision IEEE floating point.`arm_fpa_ext'The 12-byte extended precision format used by ARM FPA registers.File: gdb.info, Node: Standard Target Features, Prev: Predefined Target Types, Up: Target DescriptionsF.4 Standard Target Features============================A target description must contain either no registers or all thetarget's registers. If the description contains no registers, then GDBwill assume a default register layout, selected based on thearchitecture. If the description contains any registers, the defaultlayout will not be used; the standard registers must be described inthe target description, in such a way that GDB can recognize them.This is accomplished by giving specific names to feature elementswhich contain standard registers. GDB will look for features withthose names and verify that they contain the expected registers; if anyknown feature is missing required registers, or if any required featureis missing, GDB will reject the target description. You can addadditional registers to any of the standard features -- GDB willdisplay them just as if they were added to an unrecognized feature.This section lists the known features and their expected contents.Sample XML documents for these features are included in the GDB sourcetree, in the directory `gdb/features'.Names recognized by GDB should include the name of the company ororganization which selected the name, and the overall architecture towhich the feature applies; so e.g. the feature containing ARM coreregisters is named `org.gnu.gdb.arm.core'.The names of registers are not case sensitive for the purpose ofrecognizing standard features, but GDB will only display registersusing the capitalization used in the description.* Menu:* ARM Features::* MIPS Features::* M68K Features::* PowerPC Features::File: gdb.info, Node: ARM Features, Next: MIPS Features, Up: Standard Target FeaturesF.4.1 ARM Features------------------The `org.gnu.gdb.arm.core' feature is required for ARM targets. Itshould contain registers `r0' through `r13', `sp', `lr', `pc', and`cpsr'.The `org.gnu.gdb.arm.fpa' feature is optional. If present, itshould contain registers `f0' through `f7' and `fps'.The `org.gnu.gdb.xscale.iwmmxt' feature is optional. If present, itshould contain at least registers `wR0' through `wR15' and `wCGR0'through `wCGR3'. The `wCID', `wCon', `wCSSF', and `wCASF' registersare optional.File: gdb.info, Node: MIPS Features, Next: M68K Features, Prev: ARM Features, Up: Standard Target FeaturesF.4.2 MIPS Features-------------------The `org.gnu.gdb.mips.cpu' feature is required for MIPS targets. Itshould contain registers `r0' through `r31', `lo', `hi', and `pc'.They may be 32-bit or 64-bit depending on the target.The `org.gnu.gdb.mips.cp0' feature is also required. It shouldcontain at least the `status', `badvaddr', and `cause' registers. Theymay be 32-bit or 64-bit depending on the target.The `org.gnu.gdb.mips.fpu' feature is currently required, though itmay be optional in a future version of GDB. It should containregisters `f0' through `f31', `fcsr', and `fir'. They may be 32-bit or64-bit depending on the target.The `org.gnu.gdb.mips.linux' feature is optional. It should containa single register, `restart', which is used by the Linux kernel tocontrol restartable syscalls.File: gdb.info, Node: M68K Features, Next: PowerPC Features, Prev: MIPS Features, Up: Standard Target FeaturesF.4.3 M68K Features-------------------``org.gnu.gdb.m68k.core''``org.gnu.gdb.coldfire.core''``org.gnu.gdb.fido.core''One of those features must be always present. The feature that ispresent determines which flavor of m86k is used. The feature thatis present should contain registers `d0' through `d7', `a0'through `a5', `fp', `sp', `ps' and `pc'.``org.gnu.gdb.coldfire.fp''This feature is optional. If present, it should contain registers`fp0' through `fp7', `fpcontrol', `fpstatus' and `fpiaddr'.File: gdb.info, Node: PowerPC Features, Prev: M68K Features, Up: Standard Target FeaturesF.4.4 PowerPC Features----------------------The `org.gnu.gdb.power.core' feature is required for PowerPC targets.It should contain registers `r0' through `r31', `pc', `msr', `cr',`lr', `ctr', and `xer'. They may be 32-bit or 64-bit depending on thetarget.The `org.gnu.gdb.power.fpu' feature is optional. It should containregisters `f0' through `f31' and `fpscr'.The `org.gnu.gdb.power.altivec' feature is optional. It shouldcontain registers `vr0' through `vr31', `vscr', and `vrsave'.The `org.gnu.gdb.power.spe' feature is optional. It should containregisters `ev0h' through `ev31h', `acc', and `spefscr'. SPE targetsshould provide 32-bit registers in `org.gnu.gdb.power.core' and providethe upper halves in `ev0h' through `ev31h'. GDB will combine these topresent registers `ev0' through `ev31' to the user.File: gdb.info, Node: Copying, Next: GNU Free Documentation License, Prev: Target Descriptions, Up: TopAppendix G GNU GENERAL PUBLIC LICENSE*************************************Version 2, June 1991Copyright (C) 1989, 1991 Free Software Foundation, Inc.51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.Everyone is permitted to copy and distribute verbatim copiesof this license document, but changing it is not allowed.Preamble========The licenses for most software are designed to take away your freedomto share and change it. By contrast, the GNU General Public License isintended to guarantee your freedom to share and change freesoftware--to make sure the software is free for all its users. ThisGeneral Public License applies to most of the Free SoftwareFoundation's software and to any other program whose authors commit tousing it. (Some other Free Software Foundation software is covered bythe GNU Library General Public License instead.) You can apply it toyour programs, too.When we speak of free software, we are referring to freedom, notprice. Our General Public Licenses are designed to make sure that youhave the freedom to distribute copies of free software (and charge forthis service if you wish), that you receive source code or can get itif you want it, that you can change the software or use pieces of it innew free programs; and that you know you can do these things.To protect your rights, we need to make restrictions that forbidanyone to deny you these rights or to ask you to surrender the rights.These restrictions translate to certain responsibilities for you if youdistribute copies of the software, or if you modify it.For example, if you distribute copies of such a program, whethergratis or for a fee, you must give the recipients all the rights thatyou have. You must make sure that they, too, receive or can get thesource code. And you must show them these terms so they know theirrights.We protect your rights with two steps: (1) copyright the software,and (2) offer you this license which gives you legal permission to copy,distribute and/or modify the software.Also, for each author's protection and ours, we want to make certainthat everyone understands that there is no warranty for this freesoftware. If the software is modified by someone else and passed on, wewant its recipients to know that what they have is not the original, sothat any problems introduced by others will not reflect on the originalauthors' reputations.Finally, any free program is threatened constantly by softwarepatents. We wish to avoid the danger that redistributors of a freeprogram will individually obtain patent licenses, in effect making theprogram proprietary. To prevent this, we have made it clear that anypatent must be licensed for everyone's free use or not licensed at all.The precise terms and conditions for copying, distribution andmodification follow.TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION0. This License applies to any program or other work which contains anotice placed by the copyright holder saying it may be distributedunder the terms of this General Public License. The "Program",below, refers to any such program or work, and a "work based onthe Program" means either the Program or any derivative work undercopyright law: that is to say, a work containing the Program or aportion of it, either verbatim or with modifications and/ortranslated into another language. (Hereinafter, translation isincluded without limitation in the term "modification".) Eachlicensee is addressed as "you".Activities other than copying, distribution and modification arenot covered by this License; they are outside its scope. The actof running the Program is not restricted, and the output from theProgram is covered only if its contents constitute a work based onthe Program (independent of having been made by running theProgram). Whether that is true depends on what the Program does.1. You may copy and distribute verbatim copies of the Program'ssource code as you receive it, in any medium, provided that youconspicuously and appropriately publish on each copy an appropriatecopyright notice and disclaimer of warranty; keep intact all thenotices that refer to this License and to the absence of anywarranty; and give any other recipients of the Program a copy ofthis License along with the Program.You may charge a fee for the physical act of transferring a copy,and you may at your option offer warranty protection in exchangefor a fee.2. You may modify your copy or copies of the Program or any portionof it, thus forming a work based on the Program, and copy anddistribute such modifications or work under the terms of Section 1above, provided that you also meet all of these conditions:a. You must cause the modified files to carry prominent noticesstating that you changed the files and the date of any change.b. You must cause any work that you distribute or publish, thatin whole or in part contains or is derived from the Programor any part thereof, to be licensed as a whole at no chargeto all third parties under the terms of this License.c. If the modified program normally reads commands interactivelywhen run, you must cause it, when started running for suchinteractive use in the most ordinary way, to print or displayan announcement including an appropriate copyright notice anda notice that there is no warranty (or else, saying that youprovide a warranty) and that users may redistribute theprogram under these conditions, and telling the user how toview a copy of this License. (Exception: if the Programitself is interactive but does not normally print such anannouncement, your work based on the Program is not requiredto print an announcement.)These requirements apply to the modified work as a whole. Ifidentifiable sections of that work are not derived from theProgram, and can be reasonably considered independent and separateworks in themselves, then this License, and its terms, do notapply to those sections when you distribute them as separateworks. But when you distribute the same sections as part of awhole which is a work based on the Program, the distribution ofthe whole must be on the terms of this License, whose permissionsfor other licensees extend to the entire whole, and thus to eachand every part regardless of who wrote it.Thus, it is not the intent of this section to claim rights orcontest your rights to work written entirely by you; rather, theintent is to exercise the right to control the distribution ofderivative or collective works based on the Program.In addition, mere aggregation of another work not based on theProgram with the Program (or with a work based on the Program) ona volume of a storage or distribution medium does not bring theother work under the scope of this License.3. You may copy and distribute the Program (or a work based on it,under Section 2) in object code or executable form under the termsof Sections 1 and 2 above provided that you also do one of thefollowing:a. Accompany it with the complete corresponding machine-readablesource code, which must be distributed under the terms ofSections 1 and 2 above on a medium customarily used forsoftware interchange; or,b. Accompany it with a written offer, valid for at least threeyears, to give any third party, for a charge no more than yourcost of physically performing source distribution, a completemachine-readable copy of the corresponding source code, to bedistributed under the terms of Sections 1 and 2 above on amedium customarily used for software interchange; or,c. Accompany it with the information you received as to the offerto distribute corresponding source code. (This alternative isallowed only for noncommercial distribution and only if youreceived the program in object code or executable form withsuch an offer, in accord with Subsection b above.)The source code for a work means the preferred form of the work formaking modifications to it. For an executable work, completesource code means all the source code for all modules it contains,plus any associated interface definition files, plus the scriptsused to control compilation and installation of the executable.However, as a special exception, the source code distributed neednot include anything that is normally distributed (in eithersource or binary form) with the major components (compiler,kernel, and so on) of the operating system on which the executableruns, unless that component itself accompanies the executable.If distribution of executable or object code is made by offeringaccess to copy from a designated place, then offering equivalentaccess to copy the source code from the same place counts asdistribution of the source code, even though third parties are notcompelled to copy the source along with the object code.4. You may not copy, modify, sublicense, or distribute the Programexcept as expressly provided under this License. Any attemptotherwise to copy, modify, sublicense or distribute the Program isvoid, and will automatically terminate your rights under thisLicense. However, parties who have received copies, or rights,from you under this License will not have their licensesterminated so long as such parties remain in full compliance.5. You are not required to accept this License, since you have notsigned it. However, nothing else grants you permission to modifyor distribute the Program or its derivative works. These actionsare prohibited by law if you do not accept this License.Therefore, by modifying or distributing the Program (or any workbased on the Program), you indicate your acceptance of thisLicense to do so, and all its terms and conditions for copying,distributing or modifying the Program or works based on it.6. Each time you redistribute the Program (or any work based on theProgram), the recipient automatically receives a license from theoriginal licensor to copy, distribute or modify the Programsubject to these terms and conditions. You may not impose anyfurther restrictions on the recipients' exercise of the rightsgranted herein. You are not responsible for enforcing complianceby third parties to this License.7. If, as a consequence of a court judgment or allegation of patentinfringement or for any other reason (not limited to patentissues), conditions are imposed on you (whether by court order,agreement or otherwise) that contradict the conditions of thisLicense, they do not excuse you from the conditions of thisLicense. If you cannot distribute so as to satisfy simultaneouslyyour obligations under this License and any other pertinentobligations, then as a consequence you may not distribute theProgram at all. For example, if a patent license would not permitroyalty-free redistribution of the Program by all those whoreceive copies directly or indirectly through you, then the onlyway you could satisfy both it and this License would be to refrainentirely from distribution of the Program.If any portion of this section is held invalid or unenforceableunder any particular circumstance, the balance of the section isintended to apply and the section as a whole is intended to applyin other circumstances.It is not the purpose of this section to induce you to infringe anypatents or other property right claims or to contest validity ofany such claims; this section has the sole purpose of protectingthe integrity of the free software distribution system, which isimplemented by public license practices. Many people have madegenerous contributions to the wide range of software distributedthrough that system in reliance on consistent application of thatsystem; it is up to the author/donor to decide if he or she iswilling to distribute software through any other system and alicensee cannot impose that choice.This section is intended to make thoroughly clear what is believedto be a consequence of the rest of this License.8. If the distribution and/or use of the Program is restricted incertain countries either by patents or by copyrighted interfaces,the original copyright holder who places the Program under thisLicense may add an explicit geographical distribution limitationexcluding those countries, so that distribution is permitted onlyin or among countries not thus excluded. In such case, thisLicense incorporates the limitation as if written in the body ofthis License.9. The Free Software Foundation may publish revised and/or newversions of the General Public License from time to time. Suchnew versions will be similar in spirit to the present version, butmay differ in detail to address new problems or concerns.Each version is given a distinguishing version number. If theProgram specifies a version number of this License which appliesto it and "any later version", you have the option of followingthe terms and conditions either of that version or of any laterversion published by the Free Software Foundation. If the Programdoes not specify a version number of this License, you may chooseany version ever published by the Free Software Foundation.10. If you wish to incorporate parts of the Program into other freeprograms whose distribution conditions are different, write to theauthor to ask for permission. For software which is copyrightedby the Free Software Foundation, write to the Free SoftwareFoundation; we sometimes make exceptions for this. Our decisionwill be guided by the two goals of preserving the free status ofall derivatives of our free software and of promoting the sharingand reuse of software generally.NO WARRANTY11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NOWARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLELAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHTHOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUTWARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUTNOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY ANDFITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THEQUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THEPROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARYSERVICING, REPAIR OR CORRECTION.12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO INWRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAYMODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BELIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE ORINABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OFDATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOUOR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANYOTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEENADVISED OF THE POSSIBILITY OF SUCH DAMAGES.END OF TERMS AND CONDITIONSHow to Apply These Terms to Your New Programs=============================================If you develop a new program, and you want it to be of the greatestpossible use to the public, the best way to achieve this is to make itfree software which everyone can redistribute and change under theseterms.To do so, attach the following notices to the program. It is safestto attach them to the start of each source file to most effectivelyconvey the exclusion of warranty; and each file should have at leastthe "copyright" line and a pointer to where the full notice is found.ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.Copyright (C) YEAR NAME OF AUTHORThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or(at your option) any later version.This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin Street, Fifth Floor,Boston, MA 02110-1301, USA.Also add information on how to contact you by electronic and papermail.If the program is interactive, make it output a short notice likethis when it starts in an interactive mode:Gnomovision version 69, Copyright (C) YEAR NAME OF AUTHORGnomovision comes with ABSOLUTELY NO WARRANTY; for detailstype `show w'.This is free software, and you are welcome to redistribute itunder certain conditions; type `show c' for details.The hypothetical commands `show w' and `show c' should show theappropriate parts of the General Public License. Of course, thecommands you use may be called something other than `show w' and `showc'; they could even be mouse-clicks or menu items--whatever suits yourprogram.You should also get your employer (if you work as a programmer) oryour school, if any, to sign a "copyright disclaimer" for the program,if necessary. Here is a sample; alter the names:Yoyodyne, Inc., hereby disclaims all copyright interest in the program`Gnomovision' (which makes passes at compilers) written by James Hacker.SIGNATURE OF TY COON, 1 April 1989Ty Coon, President of ViceThis General Public License does not permit incorporating yourprogram into proprietary programs. If your program is a subroutinelibrary, you may consider it more useful to permit linking proprietaryapplications with the library. If this is what you want to do, use theGNU Library General Public License instead of this License.File: gdb.info, Node: GNU Free Documentation License, Next: Index, Prev: Copying, Up: TopAppendix H GNU Free Documentation License*****************************************Version 1.2, November 2002Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.Everyone is permitted to copy and distribute verbatim copiesof this license document, but changing it is not allowed.0. PREAMBLEThe purpose of this License is to make a manual, textbook, or otherfunctional and useful document "free" in the sense of freedom: toassure everyone the effective freedom to copy and redistribute it,with or without modifying it, either commercially ornoncommercially. Secondarily, this License preserves for theauthor and publisher a way to get credit for their work, while notbeing considered responsible for modifications made by others.This License is a kind of "copyleft", which means that derivativeworks of the document must themselves be free in the same sense.It complements the GNU General Public License, which is a copyleftlicense designed for free software.We have designed this License in order to use it for manuals forfree software, because free software needs free documentation: afree program should come with manuals providing the same freedomsthat the software does. But this License is not limited tosoftware manuals; it can be used for any textual work, regardlessof subject matter or whether it is published as a printed book.We recommend this License principally for works whose purpose isinstruction or reference.1. APPLICABILITY AND DEFINITIONSThis License applies to any manual or other work, in any medium,that contains a notice placed by the copyright holder saying itcan be distributed under the terms of this License. Such a noticegrants a world-wide, royalty-free license, unlimited in duration,to use that work under the conditions stated herein. The"Document", below, refers to any such manual or work. Any memberof the public is a licensee, and is addressed as "you". Youaccept the license if you copy, modify or distribute the work in away requiring permission under copyright law.A "Modified Version" of the Document means any work containing theDocument or a portion of it, either copied verbatim, or withmodifications and/or translated into another language.A "Secondary Section" is a named appendix or a front-matter sectionof the Document that deals exclusively with the relationship of thepublishers or authors of the Document to the Document's overallsubject (or to related matters) and contains nothing that couldfall directly within that overall subject. (Thus, if the Documentis in part a textbook of mathematics, a Secondary Section may notexplain any mathematics.) The relationship could be a matter ofhistorical connection with the subject or with related matters, orof legal, commercial, philosophical, ethical or political positionregarding them.The "Invariant Sections" are certain Secondary Sections whosetitles are designated, as being those of Invariant Sections, inthe notice that says that the Document is released under thisLicense. If a section does not fit the above definition ofSecondary then it is not allowed to be designated as Invariant.The Document may contain zero Invariant Sections. If the Documentdoes not identify any Invariant Sections then there are none.The "Cover Texts" are certain short passages of text that arelisted, as Front-Cover Texts or Back-Cover Texts, in the noticethat says that the Document is released under this License. AFront-Cover Text may be at most 5 words, and a Back-Cover Text maybe at most 25 words.A "Transparent" copy of the Document means a machine-readable copy,represented in a format whose specification is available to thegeneral public, that is suitable for revising the documentstraightforwardly with generic text editors or (for imagescomposed of pixels) generic paint programs or (for drawings) somewidely available drawing editor, and that is suitable for input totext formatters or for automatic translation to a variety offormats suitable for input to text formatters. A copy made in anotherwise Transparent file format whose markup, or absence ofmarkup, has been arranged to thwart or discourage subsequentmodification by readers is not Transparent. An image format isnot Transparent if used for any substantial amount of text. Acopy that is not "Transparent" is called "Opaque".Examples of suitable formats for Transparent copies include plainASCII without markup, Texinfo input format, LaTeX input format,SGML or XML using a publicly available DTD, andstandard-conforming simple HTML, PostScript or PDF designed forhuman modification. Examples of transparent image formats includePNG, XCF and JPG. Opaque formats include proprietary formats thatcan be read and edited only by proprietary word processors, SGML orXML for which the DTD and/or processing tools are not generallyavailable, and the machine-generated HTML, PostScript or PDFproduced by some word processors for output purposes only.The "Title Page" means, for a printed book, the title page itself,plus such following pages as are needed to hold, legibly, thematerial this License requires to appear in the title page. Forworks in formats which do not have any title page as such, "TitlePage" means the text near the most prominent appearance of thework's title, preceding the beginning of the body of the text.A section "Entitled XYZ" means a named subunit of the Documentwhose title either is precisely XYZ or contains XYZ in parenthesesfollowing text that translates XYZ in another language. (Here XYZstands for a specific section name mentioned below, such as"Acknowledgements", "Dedications", "Endorsements", or "History".)To "Preserve the Title" of such a section when you modify theDocument means that it remains a section "Entitled XYZ" accordingto this definition.The Document may include Warranty Disclaimers next to the noticewhich states that this License applies to the Document. TheseWarranty Disclaimers are considered to be included by reference inthis License, but only as regards disclaiming warranties: any otherimplication that these Warranty Disclaimers may have is void andhas no effect on the meaning of this License.2. VERBATIM COPYINGYou may copy and distribute the Document in any medium, eithercommercially or noncommercially, provided that this License, thecopyright notices, and the license notice saying this Licenseapplies to the Document are reproduced in all copies, and that youadd no other conditions whatsoever to those of this License. Youmay not use technical measures to obstruct or control the readingor further copying of the copies you make or distribute. However,you may accept compensation in exchange for copies. If youdistribute a large enough number of copies you must also followthe conditions in section 3.You may also lend copies, under the same conditions stated above,and you may publicly display copies.3. COPYING IN QUANTITYIf you publish printed copies (or copies in media that commonlyhave printed covers) of the Document, numbering more than 100, andthe Document's license notice requires Cover Texts, you mustenclose the copies in covers that carry, clearly and legibly, allthese Cover Texts: Front-Cover Texts on the front cover, andBack-Cover Texts on the back cover. Both covers must also clearlyand legibly identify you as the publisher of these copies. Thefront cover must present the full title with all words of thetitle equally prominent and visible. You may add other materialon the covers in addition. Copying with changes limited to thecovers, as long as they preserve the title of the Document andsatisfy these conditions, can be treated as verbatim copying inother respects.If the required texts for either cover are too voluminous to fitlegibly, you should put the first ones listed (as many as fitreasonably) on the actual cover, and continue the rest ontoadjacent pages.If you publish or distribute Opaque copies of the Documentnumbering more than 100, you must either include amachine-readable Transparent copy along with each Opaque copy, orstate in or with each Opaque copy a computer-network location fromwhich the general network-using public has access to downloadusing public-standard network protocols a complete Transparentcopy of the Document, free of added material. If you use thelatter option, you must take reasonably prudent steps, when youbegin distribution of Opaque copies in quantity, to ensure thatthis Transparent copy will remain thus accessible at the statedlocation until at least one year after the last time youdistribute an Opaque copy (directly or through your agents orretailers) of that edition to the public.It is requested, but not required, that you contact the authors ofthe Document well before redistributing any large number ofcopies, to give them a chance to provide you with an updatedversion of the Document.4. MODIFICATIONSYou may copy and distribute a Modified Version of the Documentunder the conditions of sections 2 and 3 above, provided that yourelease the Modified Version under precisely this License, withthe Modified Version filling the role of the Document, thuslicensing distribution and modification of the Modified Version towhoever possesses a copy of it. In addition, you must do thesethings in the Modified Version:A. Use in the Title Page (and on the covers, if any) a titledistinct from that of the Document, and from those ofprevious versions (which should, if there were any, be listedin the History section of the Document). You may use thesame title as a previous version if the original publisher ofthat version gives permission.B. List on the Title Page, as authors, one or more persons orentities responsible for authorship of the modifications inthe Modified Version, together with at least five of theprincipal authors of the Document (all of its principalauthors, if it has fewer than five), unless they release youfrom this requirement.C. State on the Title page the name of the publisher of theModified Version, as the publisher.D. Preserve all the copyright notices of the Document.E. Add an appropriate copyright notice for your modificationsadjacent to the other copyright notices.F. Include, immediately after the copyright notices, a licensenotice giving the public permission to use the ModifiedVersion under the terms of this License, in the form shown inthe Addendum below.G. Preserve in that license notice the full lists of InvariantSections and required Cover Texts given in the Document'slicense notice.H. Include an unaltered copy of this License.I. Preserve the section Entitled "History", Preserve its Title,and add to it an item stating at least the title, year, newauthors, and publisher of the Modified Version as given onthe Title Page. If there is no section Entitled "History" inthe Document, create one stating the title, year, authors,and publisher of the Document as given on its Title Page,then add an item describing the Modified Version as stated inthe previous sentence.J. Preserve the network location, if any, given in the Documentfor public access to a Transparent copy of the Document, andlikewise the network locations given in the Document forprevious versions it was based on. These may be placed inthe "History" section. You may omit a network location for awork that was published at least four years before theDocument itself, or if the original publisher of the versionit refers to gives permission.K. For any section Entitled "Acknowledgements" or "Dedications",Preserve the Title of the section, and preserve in thesection all the substance and tone of each of the contributoracknowledgements and/or dedications given therein.L. Preserve all the Invariant Sections of the Document,unaltered in their text and in their titles. Section numbersor the equivalent are not considered part of the sectiontitles.M. Delete any section Entitled "Endorsements". Such a sectionmay not be included in the Modified Version.N. Do not retitle any existing section to be Entitled"Endorsements" or to conflict in title with any InvariantSection.O. Preserve any Warranty Disclaimers.If the Modified Version includes new front-matter sections orappendices that qualify as Secondary Sections and contain nomaterial copied from the Document, you may at your optiondesignate some or all of these sections as invariant. To do this,add their titles to the list of Invariant Sections in the ModifiedVersion's license notice. These titles must be distinct from anyother section titles.You may add a section Entitled "Endorsements", provided it containsnothing but endorsements of your Modified Version by variousparties--for example, statements of peer review or that the texthas been approved by an organization as the authoritativedefinition of a standard.You may add a passage of up to five words as a Front-Cover Text,and a passage of up to 25 words as a Back-Cover Text, to the endof the list of Cover Texts in the Modified Version. Only onepassage of Front-Cover Text and one of Back-Cover Text may beadded by (or through arrangements made by) any one entity. If theDocument already includes a cover text for the same cover,previously added by you or by arrangement made by the same entityyou are acting on behalf of, you may not add another; but you mayreplace the old one, on explicit permission from the previouspublisher that added the old one.The author(s) and publisher(s) of the Document do not by thisLicense give permission to use their names for publicity for or toassert or imply endorsement of any Modified Version.5. COMBINING DOCUMENTSYou may combine the Document with other documents released underthis License, under the terms defined in section 4 above formodified versions, provided that you include in the combinationall of the Invariant Sections of all of the original documents,unmodified, and list them all as Invariant Sections of yourcombined work in its license notice, and that you preserve alltheir Warranty Disclaimers.The combined work need only contain one copy of this License, andmultiple identical Invariant Sections may be replaced with a singlecopy. If there are multiple Invariant Sections with the same namebut different contents, make the title of each such section uniqueby adding at the end of it, in parentheses, the name of theoriginal author or publisher of that section if known, or else aunique number. Make the same adjustment to the section titles inthe list of Invariant Sections in the license notice of thecombined work.In the combination, you must combine any sections Entitled"History" in the various original documents, forming one sectionEntitled "History"; likewise combine any sections Entitled"Acknowledgements", and any sections Entitled "Dedications". Youmust delete all sections Entitled "Endorsements."6. COLLECTIONS OF DOCUMENTSYou may make a collection consisting of the Document and otherdocuments released under this License, and replace the individualcopies of this License in the various documents with a single copythat is included in the collection, provided that you follow therules of this License for verbatim copying of each of thedocuments in all other respects.You may extract a single document from such a collection, anddistribute it individually under this License, provided you inserta copy of this License into the extracted document, and followthis License in all other respects regarding verbatim copying ofthat document.7. AGGREGATION WITH INDEPENDENT WORKSA compilation of the Document or its derivatives with otherseparate and independent documents or works, in or on a volume ofa storage or distribution medium, is called an "aggregate" if thecopyright resulting from the compilation is not used to limit thelegal rights of the compilation's users beyond what the individualworks permit. When the Document is included in an aggregate, thisLicense does not apply to the other works in the aggregate whichare not themselves derivative works of the Document.If the Cover Text requirement of section 3 is applicable to thesecopies of the Document, then if the Document is less than one halfof the entire aggregate, the Document's Cover Texts may be placedon covers that bracket the Document within the aggregate, or theelectronic equivalent of covers if the Document is in electronicform. Otherwise they must appear on printed covers that bracketthe whole aggregate.8. TRANSLATIONTranslation is considered a kind of modification, so you maydistribute translations of the Document under the terms of section4. Replacing Invariant Sections with translations requires specialpermission from their copyright holders, but you may includetranslations of some or all Invariant Sections in addition to theoriginal versions of these Invariant Sections. You may include atranslation of this License, and all the license notices in theDocument, and any Warranty Disclaimers, provided that you alsoinclude the original English version of this License and theoriginal versions of those notices and disclaimers. In case of adisagreement between the translation and the original version ofthis License or a notice or disclaimer, the original version willprevail.If a section in the Document is Entitled "Acknowledgements","Dedications", or "History", the requirement (section 4) toPreserve its Title (section 1) will typically require changing theactual title.9. TERMINATIONYou may not copy, modify, sublicense, or distribute the Documentexcept as expressly provided for under this License. Any otherattempt to copy, modify, sublicense or distribute the Document isvoid, and will automatically terminate your rights under thisLicense. However, parties who have received copies, or rights,from you under this License will not have their licensesterminated so long as such parties remain in full compliance.10. FUTURE REVISIONS OF THIS LICENSEThe Free Software Foundation may publish new, revised versions ofthe GNU Free Documentation License from time to time. Such newversions will be similar in spirit to the present version, but maydiffer in detail to address new problems or concerns. See`http://www.gnu.org/copyleft/'.Each version of the License is given a distinguishing versionnumber. If the Document specifies that a particular numberedversion of this License "or any later version" applies to it, youhave the option of following the terms and conditions either ofthat specified version or of any later version that has beenpublished (not as a draft) by the Free Software Foundation. Ifthe Document does not specify a version number of this License,you may choose any version ever published (not as a draft) by theFree Software Foundation.H.1 ADDENDUM: How to use this License for your documents========================================================To use this License in a document you have written, include a copy ofthe License in the document and put the following copyright and licensenotices just after the title page:Copyright (C) YEAR YOUR NAME.Permission is granted to copy, distribute and/or modify this documentunder the terms of the GNU Free Documentation License, Version 1.2or any later version published by the Free Software Foundation;with no Invariant Sections, no Front-Cover Texts, and no Back-CoverTexts. A copy of the license is included in the section entitled ``GNUFree Documentation License''.If you have Invariant Sections, Front-Cover Texts and Back-CoverTexts, replace the "with...Texts." line with this:with the Invariant Sections being LIST THEIR TITLES, withthe Front-Cover Texts being LIST, and with the Back-Cover Textsbeing LIST.If you have Invariant Sections without Cover Texts, or some othercombination of the three, merge those two alternatives to suit thesituation.If your document contains nontrivial examples of program code, werecommend releasing these examples in parallel under your choice offree software license, such as the GNU General Public License, topermit their use in free software.File: gdb.info, Node: Index, Prev: GNU Free Documentation License, Up: TopIndex*****
