aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
AgeCommit message (Collapse)AuthorFilesLines
2014-01-10[doc] Mention that "set environment" affects the shell too.Pedro Alves2-3/+16
gdb/doc/ 2014-01-10 Pedro Alves <palves@redhat.com> * gdb.texinfo (Your Program's Environment) <set environment>: Mention the shell, and point at 'set exec-wrapper'.
2014-01-07[python] Add gdb.Type.name attribute.Joel Brobecker2-0/+9
Consider the following declarations: typedef long our_time_t; our_time_t current_time = 1384395743; The purpose of this patch is to allow the use of a pretty-printer for variables of type our_time_t. Normally, pretty-printing sniffers use the tag name in order to determine which, if any, pretty-printer should be used. But in the case above, the tag name is not set, since it does not apply to integral types. This patch extends the gdb.Type list of attributes to also include the name of the type, thus allowing the sniffer to match against that name. With that change, I was able to write a pretty-printer which displays our variable as follow: (gdb) print current_time $1 = Thu Nov 14 02:22:23 2013 (1384395743) gdb/ChangeLog: * python/py-type.c (typy_get_name): New function. (type_object_getset): Add entry for attribute "name". * NEWS: Add entry mentioning this new attribute. gdb/doc/ChangeLog: * gdb.texinfo (Types In Python): Document new attribute Types.name. gdb/testsuite: * gdb.python/py-pp-integral.c: New file. * gdb.python/py-pp-integral.py: New file. * gdb.python/py-pp-integral.exp: New file. Tested on x86_64-linux.
2014-01-01Update Copyright year range in all files maintained by GDB.Joel Brobecker8-12/+12
2013-12-30Clarify documentation of the gdb.Field.bitpos attributeJoel Brobecker2-2/+7
gdb/doc/ChangeLog: * gdb.texinfo (Types In Python): Clarify the documentation of attribute gdb.Field.bitpos.
2013-12-28Fix gdb.Field attributes documentation for enum types.Joel Brobecker2-4/+13
The following patch ... | commit 14e75d8ea4fe9ed4dbf292ae4a9745e33e2ff353 | Date: Wed Apr 18 06:46:47 2012 +0000 | | gdb/ | PR symtab/7259: | [...] ... discussed under ... [PATCH] Allow 64-bit enum values http://www.sourceware.org/ml/gdb-patches/2012-03/msg00772.html ... introduced a change in the gdb.Fields API without documenting it: | I took a separate approach from the one I took in: | | http://sourceware.org/ml/gdb-patches/2012-02/msg00403.html | | and removed the overloaded meaning of the bitpos location variable to | fix PR symtab/7259. In the following patch, I introduce a separate | field_location union member 'enumval' which can accept LONGEST and | hence expand enum values to 64-bit signed values. With this change, | bitpos now only is used for (non-negative) offsets into structures, | since the other overload of bitpos (range bounds) were already | separated into struct range_bound. This patch updates the documentation to reflect that change. gdb/doc/ChangeLog: * gdb.texinfo (Types In Python): Fix the documentation of attribute "bitpos" in class gdb.Field for enum types. Add documentation for attribute "enumval" in that same class.
2013-12-28Turn -list-feature @table into @ftable.Joel Brobecker2-2/+7
This is to make it easier to discover the various options displayed by the -list-features command. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Support Commands): Change @table into @ftable.
2013-12-23Reorganize extension language auto-loading docs.Doug Evans2-246/+289
* gdb.texinfo (Auto-loading): Move menu up. Move discussion of auto-loaded objfile scripts and .debug_gdb_scripts section to their corresponding section in Extending GDB. (Extending GDB): Move menu up. New menu item "Auto-loading extensions". (Sequences): New menu item "Auto-loading sequences". (Auto-loading sequences): New node. (Python): Rename section from Scripting GDB to Extending GDB. (Python Auto-loading): Update xref, refer to "Auto-loading extensions". Move docs on ways to auto-load extensions to ... (Auto-loading extensions): ... here. New node.
2013-12-23Move GDB/MI commands related to support-query to their own @node.Joel Brobecker2-141/+165
A number of commands provide the capability to query the debugger about support for various features, and one of them in particular (-list-features), is expected to grow as new features get added. -list-target-features should also grow a bit over time, but probably slower. These commands deserve their own section and @node. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI): Add "GDB/MI Support Commands" entry in menu. (GDB/MI Variable Objects): Adjust reference to "-list-features" command, now in a new node. (GDB/MI Support Commands): New node, with its contents being extracted from the "GDB/MI Miscellaneous Commands" node. A small paragraph introducing the section is also added at the start. (GDB/MI Miscellaneous Commands): Delete the description of the -info-gdb-mi-command, -list-features and -list-target-features commands, now hosted in the "GDB/MI Support Commands" node.
2013-12-122013-12-12 Siva Chandra Reddy <sivachandra@google.com>Siva Chandra2-1/+23
PR python/16113 * NEWS (Python Scripting): Add entry for the new feature and the new attribute of gdb.Field objects. * python/py-type.c (gdbpy_is_field): New function (convert_field): Add 'parent_type' attribute to gdb.Field objects. * python/py-value.c (valpy_getitem): Allow subscript value to be a gdb.Field object. (value_has_field): New function (get_field_flag): New function * python/python-internal.h (gdbpy_is_field): Add declaration. testsuite/ * gdb.python/py-value-cc.cc: Improve test case. * gdb.python/py-value-cc.exp: Add new tests to test usage of gdb.Field objects as subscripts on gdb.Value objects. doc/ * gdb.texinfo (Values From Inferior): Add a note about using gdb.Field objects as subscripts on gdb.Value objects. (Types In Python): Add description about the new attribute "parent_type" of gdb.Field objects.
2013-12-12Add @cindex for section documenting the -list-features GDB/MI command.Joel Brobecker2-0/+6
gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Add @cindex entry for section docuumenting the -list-features GDB/MI command.
2013-12-10GDB/MI: Document support for -exec-run --start in -list-featuresJoel Brobecker2-0/+9
This adds "exec-run-start-option" in the output of the -list-features commands, allowing front-ends to easily determine whether -exec-run supports the --start option. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): add "exec-run-start-option". * NEWS: Expand the entry documenting the new -exec-run --start option to mention the corresponding new entry in the output of "-list-features". gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new "exec-run-start-option" entry in the output of the "-list-features" command. gdb/testsuite/ChangeLog: * gdb.mi/mi-start.exp: Add test verifying that -list-features contains "exec-run-start-option".
2013-12-04Fix the manual more thoroughly.Eli Zaretskii1-6/+6
2013-12-04doc/gdb.texinfo (i386): Fix yesterday's commit.Eli Zaretskii2-1/+5
2013-12-03add @kindex for catchpointsTom Tromey2-0/+19
I wanted to find the docs for "catch load" the other day, and I found out that this isn't in the index. It seems to me that each command ought to be in the index for quick reference like this, so this patch adds an @kindex (chosen because it seems to be what the rest of the manual does) for each "catch" subcommand. 2013-12-03 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Set Catchpoints): Add @kindex for each command documented here.
2013-12-03add "dir" menu item for gdbserverTom Tromey2-0/+5
I happened to notice that the gdbserver program doesn't appear in the top-level "dir" file. This adds an entry for it to the gdb manual. 2013-12-03 Tom Tromey <tromey@redhat.com> * gdb.texinfo (@direntry): Add menu item for gdbserver.
2013-12-03Documentation for MPX.Walfred Tedeschi2-0/+50
2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com> * NEWS: Add section for Intel(R) Architecture Instructions Extesions mentioning MPX. doc/ * gdb.texinfo (i386 Features): Add MPX feature registers. (x86 Specific featuresx86 Architecture-specific Issues): Adds a subsubsection for MPX and describes the display of the boundary registers. Signed-off-by: Walfred Tedeschi <walfred.tedeschi@intel.com>
2013-12-03Remove "ada-exceptions" from -list-features output.Joel Brobecker2-4/+5
Now that the -info-gdb-mi-command is available, there is no need for this entry. The entry and associated new commands were added recently enough that no front-end out there should be depending on it yet. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): Remove "ada-exceptions". gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Remove the documentation of the "ada-exceptions" entry.
2013-12-03Add "undefined-command" error code at end of ^error result...Joel Brobecker2-3/+25
... when trying to execute an undefined GDB/MI command. When trying to execute a GDB/MI command which does not exist, the current error result record looks like this: -unsupported ^error,msg="Undefined MI command: unsupported" The only indication that the command does not exist is the error message. It would be a little fragile for a consumer to rely solely on the contents of the error message in order to determine whether a command exists or not. This patch improves the situation by adding concept of error code, starting with one well-defined error code ("undefined-command") identifying errors due to a non-existant command. Here is the new output: -unsupported ^error,msg="Undefined MI command: unsupported",code="undefined-command" This error code is only displayed when the corresponding error condition is met. Otherwise, the error record remains unchanged. For instance: -symbol-list-lines foo.adb ^error,msg="-symbol-list-lines: Unknown source file name." For frontends to be able to know whether they can rely on this variable, a new entry "undefined-command-error-code" has been added to the "-list-features" command. Another option would be to always generate an error="..." variable (for the default case, we could decide for instance that the error code is the empty string). But it seems more efficient to provide that info in "-list-features" and then only add the error code when meaningful. gdb/ChangeLog: (from Pedro Alves <palves@redhat.com>) (from Joel Brobecker <brobecker@adacore.com>) * exceptions.h (enum_errors) <UNDEFINED_COMMAND_ERROR>: New enum. * mi/mi-parse.c (mi_parse): Throw UNDEFINED_COMMAND_ERROR instead of a regular error when the GDB/MI command does not exist. * mi/mi-main.c (mi_cmd_list_features): Add "undefined-command-error-code". (mi_print_exception): Print an "undefined-command" error code if EXCEPTION.ERROR is UNDEFINED_COMMAND_ERROR. * NEWS: Add entry documenting the new "code" variable in "^error" result records. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Result Records): Fix the syntax of the "^error" result record concerning the error message. Document the error code that may also be part of that result record. (GDB/MI Miscellaneous Commands): Document the "undefined-command-error-code" element in the output of the "-list-features" GDB/MI command. gdb/testsuite/ChangeLog: * gdb.mi/mi-undefined-cmd.exp: New testcase.
2013-12-03New GDB/MI command "-info-gdb-mi-command"Joel Brobecker2-0/+60
This patch adds a new GDB/MI command meant for graphical frontends trying to determine whether a given GDB/MI command exists or not. Examples: -info-gdb-mi-command unsupported-command ^done,command={exists="false"} (gdb) -info-gdb-mi-command symbol-list-lines ^done,command={exists="true"} (gdb) At the moment, this is the only piece of information that this command returns. Eventually, and if needed, we can extend it to provide command-specific pieces of information, such as updates to the command's syntax since inception. This could become, for instance: -info-gdb-mi-command symbol-list-lines ^done,command={exists="true",features=[]} (gdb) -info-gdb-mi-command catch-assert ^done,command={exists="true",features=["conditions"]} In the first case, it would mean that no extra features, while in the second, it announces that the -catch-assert command in this version of the debugger supports a feature called "condition" - exact semantics to be documented with combined with the rest of the queried command's documentation. But for now, we start small, and only worry about existance. And to bootstrap the process, I have added an entry in the output of the -list-features command as well ("info-gdb-mi-command"), allowing the graphical frontends to go through the following process: 1. Send -list-features, collect info from there as before; 2. Check if the output contains "info-gdb-mi-command". If it does, then support for various commands can be queried though -info-gdb-mi-command. Newer commands will be expected to always be checked via this new -info-gdb-mi-command. gdb/ChangeLog: * mi/mi-cmds.h (mi_cmd_info_gdb_mi_command): Declare. * mi/mi-cmd-info.c (mi_cmd_info_gdb_mi_command): New function. * mi/mi-cmds.c (mi_cmds): Add -info-gdb-mi-command command. * mi/mi-main.c (mi_cmd_list_features): Add "info-gdb-mi-command" field to output of "-list-features". * NEWS: Add entry for new -info-gdb-mi-command. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new -info-gdb-mi-command GDB/MI command. Document the meaning of "-info-gdb-mi-command" in the output of -list-features. gdb/testsuite/ChangeLog: * gdb.mi/mi-i-cmd.exp: New file.
2013-11-29UNWIND_NULL_ID is no longer used anywhere. Update comments.Pedro Alves2-1/+8
Unfortunately, UNWIND_NULL_ID is exported to Python as gdb.FRAME_UNWIND_NULL_ID so we can't really eliminate it. (I'd assume scripts just check the result of Frame.unwind_stop_reason, and compare it to gdb.FRAME_UNWIND_NO_REASON. That at most, they'll pass the result of Frame.unwind_stop_reason to gdb.frame_stop_reason_string. I'd prefer to just get rid of it, but because we make an API promise, we get to keep this around for compatibility, in case a script does refer to gdb.FRAME_UNWIND_NULL_ID directly.) gdb/ 2013-11-29 Pedro Alves <palves@redhat.com> * unwind_stop_reasons.def (UNWIND_NULL_ID): Update comment. gdb/doc/ 2013-11-29 Pedro Alves <palves@redhat.com> * gdb.texinfo (Frames In Python) <gdb.FRAME_UNWIND_NULL_ID>: Update comment.
2013-11-24set/show code-cacheYao Qi2-1/+19
Similar to stack cache, in this patch, we add TARGET_OBJECT_CODE_MEMORY to read code from target and add a new option "set code-cache on|off" to optimize code accesses by using the target memory cache. In V4: - Remove "without affecting correctness" from NEWS and doc. - Replace "ON" with "on" in doc. - "access" -> "accesses". In V3: - Rename functions and variables. - Update command help, doc and NEWS entry. - Invalidate cache on option transitions, to align with the behaviour of "stack-cache". Since cache invalidation is transparent to users, users don't know option "stack-cache" transitions cause code cache invalidation. V2 was reviewed by Doug. There are some changes in V3, so I post it here. gdb: 2013-11-24 Yao Qi <yao@codesourcery.com> * NEWS: Add note on new "set code-cache" option. * target-dcache.c (code_cache_enabled_1): New variable. (code_cache_enabled): New variable. (show_code_cache, set_code_cache): New function. (code_cache_enabled_p): New function. (_initialize_target_dcache): Register command. * target-dcache.h (code_cache_enabled_p): Declare. * target.c (memory_xfer_partial_1):Handle TARGET_OBJECT_CODE_MEMORY and code_cache_enabled. (target_read_code): New function. * target.h (enum target_object) <TARGET_OBJECT_CODE_MEMORY>: New. (target_read_code): Declare. gdb/doc: 2013-11-24 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Caching Remote Data): Document new "set/show stack-cache" option.
2013-11-24Write "ON" and "OFF" in lower case in GDB doc.Yao Qi2-3/+9
gdb/doc: 2013-11-24 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Caching Target Data): Replace "ON" with "on". (Maintenance Commands): Replace "ON" and "OFF" with "on" and "off" respectively.
2013-11-23Update doc on displayhint in command -var-list-childrenYao Qi2-0/+10
Hi, When using command -var-list-children, "displayhint" appears in the result of each child, shown as the following output. -var-list-children ss1 ^M ^done,numchild="2",displayhint="pp_ss",children=[child={name="ss1.a",exp="a",numchild="0",type="struct s",thread-id="1",displayhint="pp_s",dynamic="1"},child={name="ss1.b",exp="b",numchild="0",type="struct s",thread-id="1",displayhint="pp_s",dynamic="1"}],has_more="0" Current doc on command -var-list-children doesn't reflect this. This patch is to fix it. gdb/doc: 2013-11-23 Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Add the description of "displayhint" to the table about child results.
2013-11-21Doc 'dynamic' for command -var-list-childrenYao Qi2-0/+11
Hi, I find "dynamic=1" appear in the result of each child of the output of -var-list-children, -var-list-children ss1 ^done,numchild="2",children=[child={name="ss1.a",exp="a",numchild="0",type="struct s",thread-id="1",dynamic="1"},child={name="ss1.b",exp="b",numchild="0",type="struct s",thread-id="1",dynamic="1"}],has_more="0" but the doc doesn't mention this. This patch is to copy the description of "dynamic=1" here. gdb/doc: 2013-11-21 Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Add attribute 'dynamic' for the output of command -var-list-children.
2013-11-21s/see @pxref/@pxref in docYao Qi2-1/+6
Looks "see" is unnecessary before @pxref. gdb/doc: 2013-11-21 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Caching Target Data): Remove "see" before @pxref.
2013-11-20Associate target_dcache to address_space.Yao Qi2-5/+12
Hi, Nowadays, 'target_dcache' is a global variable in GDB, which is not necessary. It can be a per-address-space variable. In this patch, we associate target_dcache to address_space. gdb/doc: 2013-11-20 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Caching Target Data): Update doc for per-address-space dcache. gdb: 2013-11-20 Yao Qi <yao@codesourcery.com> * progspace.h (struct address_space_data): Declare. * target-dcache.c: Include "progspace.h". (target_dache): Remove. (target_dcache_aspace_key): New. (target_dcache_cleanup): New function. (target_dcache_init_p): Get data through target_dcache_aspace_key. (target_dcache_invalidate): Likewise. (target_dcache_get): Likewise. (target_dcache_get_or_init): Likewise. (_initialize_target_dcache): Initialize target_dcache_aspace_key.
2013-11-20Don't stress 'remote' in "Data Caching" in docYao Qi2-15/+22
When I try to describe the cache and its related commands (in a cache-per-address-space world), I find hard to add, because existing doc is focused on remote debugging, while data cache is used regardless of the target. More precisely, GDB cache target data, instead of remote data. gdb/doc: 2013-11-20 Yao Qi <yao@codesourcery.com> * gdb.texinfo (Data): Rename menu item. (Caching Remote Data): Rename to ... (Caching Target Data): ... it. Update.
2013-11-18Add "language-option" to -list-featuresJoel Brobecker2-0/+9
Following the addition of the --language optiton to all GDB/MI commands, I realized that there was no easy way for front-ends to figure out whether this features is available or not. So I added a "language-option" entry to -list-features. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): Add "language-options" to -list-features output. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Document the new "language-option" entry in the output of the "-list-features" command.
2013-11-15fix PR c++/16117Tom Tromey2-5/+23
This patch fixes PR c++/16117. gdb has an extension so that users can use expressions like FILE::NAME to choose a variable of the given name from the given file. The bug is that this extension takes precedence over ordinary C++ expressions of the same form. You might think this is merely hypothetical, but now that C++ headers commonly do not use an extension, it is more common. This patch fixes the bug by making two related changes. First, it changes gdb to prefer the ordinary C++ meaning of a symbol over the extended meaning. Second, it arranges for single-quoting of the symbol to indicate a preference for the extension. Built and regtested on x86-64 Fedora 18. New test case included. 2013-11-15 Tom Tromey <tromey@redhat.com> PR c++/16117: * c-exp.y (lex_one_token): Add "is_quoted_name" argument. (classify_name): Likewise. Prefer a field of "this" over a filename. (classify_inner_name, yylex): Update. 2013-11-15 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Variables): Note gdb rules for ambiguous cases. Add example. 2013-11-15 Tom Tromey <tromey@redhat.com> * gdb.cp/includefile: New file. * gdb.cp/filename.exp: New file. * gdb.cp/filename.cc: New file.
2013-11-14fix grammar oddity in the manualTom Tromey2-1/+5
This patch fixes a buglet in the manual. It's wrong to say that a method is defined "as" a subclass. Instead it should say that a method is defined "in" a subclass. I'm checking this in under the obvious rule. 2013-11-14 Tom Tromey <tromey@redhat.com> * gdb.texinfo (Breakpoints In Python): Replace "as" with "in".
2013-11-14GDB/MI: Add new "--language LANG" command option.Joel Brobecker2-0/+29
Frontend sometimes need to evaluate expressions that are language-specific. For instance, Eclipse uses the following expression to determine the size of an address on the target: -data-evaluate-expression "sizeof (void*)" Unfortunately, if the main of the program being debugged is not C, this may not work. For instance, if the main is in Ada, you get... -data-evaluate-expression "sizeof (void*)" ^error,msg="No definition of \"sizeof\" in current context." ... and apparently decides to stop the debugging session as a result. The recommendation sent was to specifically set the language to C before trying to evaluate the expression. Something such as: 1. save current language 2. set language c 3. -data-evaluate-expression "sizeof (void*)" 4. Restore language This has the same disadvantages as the ones outlined in the "Context Management" section of the GDB/MI documentation regarding setting the current thread or the current frame, thus recommending the use of general command-line switches such as --frame, or --thread instead. This patch follows the same steps for the language, adding a similar new command option: --language LANG. Example of use: -data-evaluate-expression --language c "sizeof (void*)" ^done,value="4" gdb/ChangeLog: * mi/mi-parse.h (struct mi_parse) <language>: New field. * mi/mi-main.c (mi_cmd_execute): Temporarily set language to PARSE->LANGUAGE during command execution, if set. * mi/mi-parse.c: Add "language.h" #include. (mi_parse): Add parsing of "--language" command option. * NEWS: Add entry mentioning the new "--language" command option. gdb/testsuite/ChangeLog: * gdb.mi/mi-language.exp: New file. gdb/doc/ChangeLog: * gdb.texinfo (Show): Add xref anchor for "show language" command. (Context management): Place current subsection text into its own subsubsection. Add new subsubsection describing the "--language" command option.
2013-11-13Replace "info-ada-exceptions" by "ada-exceptions" in -list-featuresJoel Brobecker2-2/+12
Rather than having -list-features report support for the GDB/MI commands providing access to Ada exception catchpoints with one entry, and the GDB/MI command providing the list of Ada exceptions with a second entry, this patch merges it all within one single entry. This is OK, because all these commands were added within a short amount of time, and within the same release cycle; and it reduces a bit the size of the output. gdb/ChangeLog: * mi/mi-main.c (mi_cmd_list_features): Replace "info-ada-exceptions" entry with "ada-exceptions". gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Delete the documentation of "info-ada-exceptions" in the output of the "-list-features" command. Add the documentation of the "ada-exception" entry instead.
2013-11-12Small fix (first word of sentence to start with capital letter)Joel Brobecker2-2/+7
gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Miscellaneous Commands): Fix the first word of a couple of sentences to start with a capital letter.
2013-11-12Document "info exceptions" and "-info-ada-exception" new commands.Joel Brobecker2-1/+106
gdb/doc/ChangeLog: * gdb.texinfo (Ada): Add entry in menu for new "Ada Exceptions" node. (Ada Exceptions): New node. (GDB/MI): Add entry in menu for new "GDB/MI Ada Exceptions Commands" node. (GDB/MI Ada Exceptions Commands): New node. (GDB/MI Miscellaneous Commands): Document new "info-ada-exceptions" field in the output of the "-list-features" command. * NEWS: Add entry for the new "info exceptions" CLI command, and for the new "-info-ada-exceptions" GDB/MI command.
2013-11-112013-11-11 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon2-0/+89
PR python/15629 * NEWS: Add linetable feature. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-linetable entries. * python/py-linetable.c: New file. * python/py-symtab.c (stpy_get_linetable): New function. * python/python-internal.h (symtab_to_linetable_object): Declare. (gdbpy_initialize_linetable): Ditto. * python/python.c (_initialize_python): Call gdbpy_initialize_linetable. 2013-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-linetable.S: New file. * gdb.python/py-linetable.c: New file. * gdb.python/py-linetable.exp: New file. 2013-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Symbol Tables In Python): Add linetable method entry. (Line Tables In Python): New node.
2013-11-08Change "set debug dwarf2-read" to take a verbosity level.Doug Evans2-1/+8
* dwarf2read.c (dwarf2_read_debug): Change to unsigned int. (create_debug_types_hash_table): Only print debugging messages for each TU if dwarf2-read >= 2. (process_queue): Ditto. (_initialize_dwarf2_read): Make "set debug dwarf2-read" a zuinteger. Update doc string. doc/ * gdb.texinfo (Debugging Output): Update text for "set debug dwarf2-read".
2013-11-08Change "set debug symtab-create" to take a verbosity level.Doug Evans2-1/+8
* NEWS: Mention that "set debug symtab-create" now accepts a verbosity level. * buildsym.c (end_symtab_from_static_block): Call set_symtab_primary to set the symtab's primary flag. * jit.c (finalize_symtab): Ditto. * mdebugread.c (psymtab_to_symtab_1): Ditto. * symfile.c (allocate_symtab): Only print debugging messages for symtab_create_debug levels 2 and higher. * symtab.c (symtab_create_debug): Change type to unsigned int. (set_symtab_primary): New function. (_initialize_symtab): Change "set debug symtab-create" to a zuinteger option. * symtab.h (set_symtab_primary): Declare. (symtab_create_debug): Update decl. doc/ * gdb.texinfo (Debugging Output): Update text for "set debug symtab-create".
2013-11-072013-11-07 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon2-0/+12
PR python/15747 * python/py-cmd.c: Add COMPLETE_EXPRESSION constant. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-cmd.exp: Add COMPLETE_EXPRESSION tests. * gdb.python/py-cmd.c: New File. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Commands In Python): Document COMPLETE_EXPRESSION constant.
2013-11-072013-11-07 Phil Muldoon <pmuldoon@redhat.com>Phil Muldoon2-16/+37
* python/py-breakpoint.c (bppy_get_temporary): New function. (bppy_init): New keyword: temporary. Parse it and set breakpoint to temporary if True. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-breakpoint.exp: Add temporary breakpoint tests. 2013-11-07 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Breakpoints In Python): Document temporary option in breakpoint constructor, and add documentation to the temporary attribute.
2013-11-07Remove varobj_language_string, languages and varobj_languagesYao Qi2-1/+7
This patch does some cleanups, removing some language-related stuff. Note that mi_cmd_var_info_expression uses varobj_language_string, which is redundant, because we can get language name from lang->la_natural_name. varobj_language_string doesn't have "Ada", which looks like a bug to me. With this patch applied, this problem doesn't exist, because the language name is got from the same place (field la_natural_name). gdb: 2013-11-07 Yao Qi <yao@codesourcery.com> * mi/mi-cmd-var.c: Include "language.h". (mi_cmd_var_info_expression): Get language name from language_defn. * varobj.c (varobj_language_string): Remove. (variable_language): Remove declaration. (languages): Remove. (varobj_get_language): Change the type of return value. (variable_language): Remove. * varobj.h (enum varobj_languages): Remove. (varobj_language_string): Remove declaration. (varobj_get_language): Update declaration. gdb/doc: 2013-11-07 Yao Qi <yao@codesourcery.com> * gdb.texinfo (GDB/MI Variable Objects): Update doc about the output of "-var-info-expression".
2013-11-06[DOC] shell startup files, clarifications and fixes.Pedro Alves2-11/+21
When Bash is started non-interactively, it runs the script pointed by the BASH_ENV environment variable, not .bashrc. While at it, mention Z shell in the warning too, and mention non-interactive mode explicitly. gdb/doc/ 2013-11-06 Pedro Alves <palves@redhat.com> * gdb.texinfo (Starting) <set/show startup-with-shell>: Mention non-interactive mode. (Environment) <shell startup files warning>: Mention non-interactive mode. Mention .zshenv for Z shell, and talk about BASH_ENV instead of .bashrc for BASH.
2013-10-29ChangeLog entries for the remove-symbol-file commits.Nicolas Blanc1-0/+6
2013-10-29Documentation for the remove-symbol-file command.Nicolas Blanc1-2/+24
2013-10-29 Nicolas Blanc <nicolas.blanc@intel.com> * NEWS: Add description of the remove-symbol-file command. gdb/doc * gdb.texinfo (Commands to Specify Files): Add description of the remove-symbol-file command. Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
2013-10-29New remove-symbol-file command.Nicolas Blanc1-0/+4
New command for removing symbol files added via the add-symbol-file command. 2013-10-29 Nicolas Blanc <nicolas.blanc@intel.com> * breakpoint.c (disable_breakpoints_in_freed_objfile): New function. * objfiles.c (free_objfile): Notify free_objfile. (is_addr_in_objfile): New function. * objfiles.h (is_addr_in_objfile): New declaration. * printcmd.c (clear_dangling_display_expressions): Act upon free_objfile events instead of solib_unloaded events. (_initialize_printcmd): Register observer for free_objfile instead of solib_unloaded notifications. * solib.c (remove_user_added_objfile): New function. * symfile.c (remove_symbol_file_command): New command. (_initialize_symfile): Add remove-symbol-file. gdb/doc * observer.texi: New free_objfile event. Signed-off-by: Nicolas Blanc <nicolas.blanc@intel.com>
2013-10-25Make STARTUP_WITH_SHELL a runtime toggle -- add new "set/show ↵Pedro Alves2-2/+34
startup-with-shell" option. Occasionaly we hear about people having problems with GDB not being able to start programs (with "run"/"start"). GDB spawns a shell to start the program, and most often, it'll be the case that the problem is actually with the user's shell setup. GDB has code to disable the use of the shell to start programs. That's the STARTUP_WITH_SHELL macro that native targets could set to 0 in their nm.h file (though no target actually uses it nowadays). This patch makes that setting a run-time knob instead. This will be useful to quickly diagnose such shell issues, and might also come in handy at other times (such as when debugging the shell itself, if you don't have a different shell handy). gdb/ 2013-10-24 Pedro Alves <palves@redhat.com> * NEWS (New options): Mention set/show startup-with-shell. * config/alpha/nm-osf3.h (START_INFERIOR_TRAPS_EXPECTED): Set to 2 instead of 3. * fork-child.c (fork_inferior, startup_inferior): Handle 'set startup-with-shell'. (show_startup_with_shell): New function. (_initialize_fork_child): Register the set/show startup-with-shell commands. * inf-ptrace.c (inf_ptrace_create_inferior): Remove comment. * inf-ttrace.c (inf_ttrace_him): Remove comment. * procfs.c (procfs_init_inferior): Remove comment. * infcmd.c (startup_with_shell): New global. * inferior.h (startup_with_shell): Declare global. (STARTUP_WITH_SHELL): Delete. (START_INFERIOR_TRAPS_EXPECTED): Set to 1 by default instead of 2. gdb/doc/ 2013-10-24 Pedro Alves <palves@redhat.com> * gdb.texinfo (Starting): Document set/show startup-with-shell.
2013-10-11ChangeLog entries for the previous commit.Joel Brobecker1-0/+9
git-related mistake (added the files to the index, but forgot to commit --amend them before pushing the commit)
2013-10-11Document the -catch-assert and -catch-exception new GDB/MI commands.Joel Brobecker1-0/+99
This patch adds documentation for the new GDB/MI commands "-catch-assert" and "-catch-exception", meant to provide the same functionality as the "catch assert", "catch exception" and "catch exception unhandled" CLI commands. In the GDB Manual, there was already a section for catchpoint comments, so that seemed like a natural place to document the new commands. But commands related to a given concept seem to have traditionally been organized alphabetically, and I didn't want future commands to break down logical pairing of various commands. For instance, "-catch-load" and "-catch-unload" are quite "distant" from each other, and it is easy to imagine a new comment which would alphabetically fall in between, causing them to be separated. So I introduced subsections to prevent that from happening. gdb/ChangeLog: * NEWS: Add entry documenting the new "-catch-assert" and "-catch-exception" GDB/MI commands. gdb/doc/ChangeLog: * gdb.texinfo (Shared Library GDB/MI Catchpoint Commands): New subsection inside which the "-catch-load" and "-catch-unload" commands documentation is now placed. (Ada Exception GDB/MI Catchpoint Commands): New subsection documenting the "-catch-assert" and "-catch-exception" new GDB/MI commands.
2013-10-11Adjust gdb/doc/ChangeLog re "set/show remotebaud" renaming...Joel Brobecker1-2/+4
... adding the node names, to be more explicit about which nodes were affected by this change.
2013-10-10Remove unnecessary @w{} in gdb.texinfoJoel Brobecker2-1/+5
gdb/doc/ChangeLog: * gdb.texinfo (Connecting): Remove unnecessary @w{}.
2013-10-10Rename "set/show remotebaud" command into "set/show serial baud"Joel Brobecker2-4/+9
This patch renames the "set/show remotebaud" commands into "set/show serial baud", and moves its implementation into serial.c. It also moves the "baud_rate" global from top.c to serial.c, where the new code is being added (the alternative was to add an include of target.h). And to facilitate the transition to the new setting name, this patch also preserves the old commands, and marks them as deprecated to alert the users of the change. gdb/ChangeLog: * cli/cli-cmds.c (show_baud_rate): Moved to serial.c as serial_baud_show_cmd. (_initialize_cli_cmds): Delete the code creating the "set/show remotebaud" commands. * serial.c (baud_rate): Move here from top.c. (serial_baud_show_cmd): Move here from cli/cli-cmds.c. (_initialize_serial): Create "set/show serial baud" commands. Add "set/show remotebaud" command aliases. * top.c (baud_rate): Moved to serial.c. * NEWS: Document the new "set/show serial baud" commands, replacing "set/show remotebaud". gdb/doc/ChangeLog: * gdb.texinfo: Replace "set remotebaud" and "show remotebaud" by "set serial baud" and "show serial baud" (resp) throughout.