]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/NEWS
gdb: make deprecated_show_value_hack static
[thirdparty/binutils-gdb.git] / gdb / NEWS
CommitLineData
c906108c
SS
1 What has changed in GDB?
2 (Organized release by release)
3
4ff87a30
JB
4*** Changes since GDB 13
5
acdf6071
LM
6* The AArch64 'org.gnu.gdb.aarch64.pauth' Pointer Authentication feature string
7 has been deprecated in favor of the 'org.gnu.gdb.aarch64.pauth_v2' feature
8 string.
9
303a881f
TT
10* GDB now has some support for integer types larger than 64 bits.
11
2eb26135
AVK
12* Removed targets and native configurations
13
14 GDB no longer supports AIX 4.x, AIX 5.x and AIX 6.x. The minimum supported
15 AIX version is now AIX 7.1.
16
ff52c073
CS
17* Multi-target feature configuration
18
19 GDB now supports the individual configuration of remote targets' feature
20 sets. Based on the current selection of a target, the commands 'set remote
21 <name>-packet (on|off|auto)' and 'show remote <name>-packet' can be used to
22 configure a target's feature packet and to display its configuration,
23 respectively.
24
fe4c3ca0
CS
25 The individual packet sizes can be configured and shown using the commands
26 ** 'set remote memory-read-packet-size (number of bytes|fixed|limit)'
27 ** 'set remote memory-write-packet-size (number of bytes|fixed|limit)'
28 ** 'show remote memory-read-packet-size'
29 ** 'show remote memory-write-packet-size'.
30
31 The configuration of the packet itself, as well as the size of a memory-read
32 or memory-write packet applies to the currently selected target (if
33 available). If no target is selected, it applies to future remote
ff52c073
CS
34 connections. Similarly, the show commands print the configuration of the
35 currently selected target. If no remote target is selected, the default
36 configuration for future connections is shown.
37
975249ff
TT
38* MI version 1 has been removed.
39
de7d7cb5
TT
40* GDB has initial built-in support for the Debugger Adapter Protocol.
41 This support requires that GDB be built with Python scripting
42 enabled.
43
980dbf36
AB
44* For the break command, multiple uses of the 'thread' or 'task'
45 keywords will now give an error instead of just using the thread or
46 task id from the last instance of the keyword. E.g.:
47 break foo thread 1 thread 2
48 will now give an error rather than using 'thread 2'.
49
50* For the watch command, multiple uses of the 'task' keyword will now
51 give an error instead of just using the task id from the last
52 instance of the keyword. E.g.:
53 watch my_var task 1 task 2
54 will now give an error rather than using 'task 2'. The 'thread'
55 keyword already gave an error when used multiple times with the
56 watch command, this remains unchanged.
57
a0c07915
AB
58* The 'set print elements' setting now helps when printing large arrays.
59 If an array would otherwise exceed max-value-size, but 'print elements'
60 is set such that the size of elements to print is less than or equal
61 to 'max-value-size', GDB will now still print the array, however only
62 'max-value-size' worth of data will be added into the value history.
63
0a9ccb9d
AB
64* For both the break and watch commands, it is now invalid to use both
65 the 'thread' and 'task' keywords within the same command. For
66 example the following commnds will now give an error:
67 break foo thread 1 task 1
68 watch var thread 2 task 3
69
e24d337e
BL
70* New commands
71
72maintenance print record-instruction [ N ]
73 Print the recorded information for a given instruction. If N is not given
74 prints how GDB would undo the last instruction executed. If N is negative,
75 prints how GDB would undo the N-th previous instruction, and if N is
76 positive, it prints how GDB will redo the N-th following instruction.
77
be016879
TV
78maintenance info frame-unwinders
79 List the frame unwinders currently in effect, starting with the highest
80 priority.
81
f0c3dcc1
TT
82maintenance wait-for-index-cache
83 Wait until all pending writes to the index cache have completed.
84
0d5adb56
TV
85set always-read-ctf on|off
86show always-read-ctf
87 When off, CTF is only read if DWARF is not present. When on, CTF is
88 read regardless of whether DWARF is present. Off by default.
89
03d83cd5
RB
90info main
91 Get main symbol to identify entry point into program.
92
91265a7d
PA
93* New convenience function "$_shell", to execute a shell command and
94 return the result. This lets you run shell commands in expressions.
95 Some examples:
96
97 (gdb) p $_shell("true")
98 $1 = 0
99 (gdb) p $_shell("false")
100 $2 = 1
101 (gdb) break func if $_shell("some command") == 0
102
37f54063
BL
103* MI changes
104
105** mi now reports 'no-history' as a stop reason when hitting the end of the
106 reverse execution history.
107
2fd9a436
AB
108** When creating a thread-specific breakpoint using the '-p' option,
109 the -break-insert command would report the 'thread' field twice in
110 the reply. The content of both fields was always identical. This
111 has now been fixed; the 'thread' field will be reported just once
112 for thread-specific breakpoints, or not at all for breakpoints
113 without a thread restriction. The same is also true for the 'task'
114 field of an Ada task-specific breakpoint.
115
6bf5f25b
AB
116* Python API
117
118 ** The gdb.unwinder.Unwinder.name attribute is now read-only.
119
120 ** The name argument passed to gdb.unwinder.Unwinder.__init__ must
121 now be of type 'str' otherwise a TypeError will be raised.
122
123 ** The gdb.unwinder.Unwinder.enabled attribute can now only accept
124 values of type 'bool'. Changing this attribute will now
125 invalidate GDB's frame-cache, which means GDB will need to
126 rebuild its frame-cache when next required - either with, or
127 without the particular unwinder, depending on how 'enabled' was
128 changed.
129
86b35b71
AB
130 ** New methods added to the gdb.PendingFrame class. These methods
131 have the same behaviour as the corresponding methods on
132 gdb.Frame. The new methods are:
133
134 - gdb.PendingFrame.name: Return the name for the frame's
135 function, or None.
136 - gdb.PendingFrame.is_valid: Return True if the pending frame
137 object is valid.
138 - gdb.PendingFrame.pc: Return the $pc register value for this
139 frame.
140 - gdb.PendingFrame.language: Return a string containing the
141 language for this frame, or None.
142 - gdb.PendingFrame.find_sal: Return a gdb.Symtab_and_line
143 object for the current location within the pending frame, or
144 None.
145 - gdb.PendingFrame.block: Return a gdb.Block for the current
146 pending frame, or None.
147 - gdb.PendingFrame.function: Return a gdb.Symbol for the
148 current pending frame, or None.
149
64826d05
AB
150 ** The frame-id passed to gdb.PendingFrame.create_unwind_info can
151 now use either an integer or a gdb.Value object for each of its
152 'sp', 'pc', and 'special' attributes.
153
3712e78c
AB
154 ** A new class gdb.unwinder.FrameId has been added. Instances of
155 this class are constructed with 'sp' (stack-pointer) and 'pc'
156 (program-counter) values, and can be used as the frame-id when
157 calling gdb.PendingFrame.create_unwind_info.
158
4ff87a30 159*** Changes in GDB 13
ba09d2a8 160
560f8d05
TT
161* MI version 1 is deprecated, and will be removed in GDB 14.
162
68cffbbd
LM
163* GDB now supports dumping memory tag data for AArch64 MTE. It also supports
164 reading memory tag data for AArch64 MTE from core files generated by
165 the gcore command or the Linux kernel.
166
167 When a process uses memory-mapped pages protected by memory tags (for
168 example, AArch64 MTE), this additional information will be recorded in
169 the core file in the event of a crash or if GDB generates a core file
170 from the current process state. GDB will show this additional information
171 automatically, or through one of the memory-tag subcommands.
172
fbcda577
PA
173* "info breakpoints" now displays enabled breakpoint locations of
174 disabled breakpoints as in the "y-" state. For example:
175
176 (gdb) info breakpoints
177 Num Type Disp Enb Address What
178 1 breakpoint keep n <MULTIPLE>
179 1.1 y- 0x00000000000011b6 in ...
180 1.2 y- 0x00000000000011c2 in ...
181 1.3 n 0x00000000000011ce in ...
182
ed8f05ba
JB
183* Support for Thread Local Storage (TLS) variables on FreeBSD arm and
184 aarch64 architectures.
185
065a00b3
JB
186* GDB now supports hardware watchpoints on FreeBSD/Aarch64.
187
edae3fd6
SM
188* Remove support for building against Python 2, it is now only possible to
189 build GDB against Python 3.
190
49a82d50
TT
191* DBX mode has been removed.
192
cc96ae7f
LS
193* GDB now honours the DWARF prologue_end line-table entry flag the compiler can
194 emit to indicate where a breakpoint should be placed to break in a function
195 past its prologue.
196
89555e4e
MR
197* Completion now also offers "NUMBER" for "set" commands that accept
198 a numeric argument and the "unlimited" keyword. For example:
199
200 (gdb) set width <TAB>
201 NUMBER unlimited
202
203 and consequently:
204
205 (gdb) complete set width
206 set width NUMBER
207 set width unlimited
208
4cbe4ca5
AB
209* Disassembler styling using libopcodes. GDB now supports
210 disassembler styling using libopcodes. This is only available for
211 some targets (currently x86 and RISC-V). For unsupported targets
212 Python Pygments is still used. For supported targets, libopcodes
213 styling is used by default.
214
d08bae3d
TT
215* The Windows native target now supports target async.
216
2cac01e3
FS
217* gdb now supports zstd compressed debug sections (ELFCOMPRESS_ZSTD) for ELF.
218
d4ce49b7
AB
219* The format of 'disassemble /r' and 'record instruction-history /r'
220 has changed. The instruction bytes could now be grouped together,
221 and displayed in the endianness of the instruction. This is the
222 same layout as used by GNU objdump when disassembling.
223
224 There is now 'disassemble /b' and 'record instruction-history /b'
225 which will always display the instructions bytes one at a time in
226 memory order, that is, the byte at the lowest address first.
227
228 For both /r and /b GDB is now better at using whitespace in order to
229 align the disassembled instruction text.
230
92c1d07d
PA
231* The TUI no longer styles the source and assembly code highlighted by
232 the current position indicator by default. You can however
233 re-enable styling using the new "set style tui-current-position"
234 command.
235
cbda14de
AB
236* New convenience variable $_inferior_thread_count contains the number
237 of live threads in the current inferior.
238
78805ff8
PW
239* When a breakpoint with multiple code locations is hit, GDB now prints
240 the code location using the syntax <breakpoint_number>.<location_number>
241 such as in:
242 Thread 1 "zeoes" hit Breakpoint 2.3, some_func () at zeoes.c:8
243
244* When a breakpoint is hit, GDB now sets the convenience variables $_hit_bpnum
245 and $_hit_locno to the hit breakpoint number and code location number.
246 This allows to disable the last hit breakpoint using
247 (gdb) disable $_hit_bpnum
248 or disable only the specific breakpoint code location using
249 (gdb) disable $_hit_bpnum.$_hit_locno
250 These commands can be used inside the command list of a breakpoint to
251 automatically disable the just encountered breakpoint (or the just
252 encountered specific breakpoint code location).
253 When a breakpoint has only one location, $_hit_locno is set to 1 so that
254 (gdb) disable $_hit_bpnum.$_hit_locno
255 and
256 (gdb) disable $_hit_bpnum
257 are both disabling the breakpoint.
258
6109f7a3
LS
259* New commands
260
261maintenance set ignore-prologue-end-flag on|off
262maintenance show ignore-prologue-end-flag
263 This setting, which is off by default, controls whether GDB ignores the
264 PROLOGUE-END flag from the line-table when skipping prologue. This can be
265 used to force GDB to use prologue analyzers if the line-table is constructed
266 from erroneous debug information.
267
153b3c11
EL
268set print nibbles [on|off]
269show print nibbles
270 This controls whether the 'print/t' command will display binary values
271 in groups of four bits, known as "nibbles". The default is 'off'.
272
4cbe4ca5
AB
273maintenance set libopcodes-styling on|off
274maintenance show libopcodes-styling
275 These can be used to force off libopcodes based styling, the Python
276 Pygments styling will then be used instead.
277
278set style disassembler comment
279show style disassembler comment
280set style disassembler immediate
281show style disassembler immediate
282set style disassembler mnemonic
283show style disassembler mnemonic
284set style disassembler register
285show style disassembler register
286set style disassembler address
287show style disassembler address
288set style disassembler symbol
289show style disassembler symbol
290 For targets that support libopcodes based styling, these settings
291 control how various aspects of the disassembler output are styled.
292 The 'disassembler address' and 'disassembler symbol' styles are
293 aliases for the 'address' and 'function' styles respectively.
294
70175292
AB
295maintenance print frame-id [ LEVEL ]
296 Print GDB's internal frame-id for the frame at LEVEL. If LEVEL is
297 not given, then print the frame-id for the currently selected frame.
298
e4014689
AB
299set debug infcall on|off
300show debug infcall
301 Print additional debug messages about inferior function calls.
302
e26d0dab
SM
303set debug solib on|off
304show debug solib
305 Print additional debug messages about shared library handling.
306
92c1d07d
PA
307set style tui-current-position [on|off]
308 Whether to style the source and assembly code highlighted by the
309 TUI's current position indicator. The default is off.
310
76b58849
AB
311set print characters LIMIT
312show print characters
313 This new setting is like 'set print elements', but controls how many
314 characters of a string are printed. This functionality used to be
315 covered by 'set print elements', but it can be controlled separately
316 now. LIMIT can be set to a numerical value to request that particular
317 character count, to 'unlimited' to print all characters of a string,
318 or to 'elements', which is also the default, to follow the setting of
319 'set print elements' as it used to be.
320
321print -characters LIMIT
322 This new option to the 'print' command has the same effect as a temporary
323 use of 'set print characters'.
324
cc96ae7f
LS
325* Changed commands
326
effcf7b1
PW
327document user-defined
328 It is now possible to document user-defined aliases.
329 When a user-defined alias is documented, the help and apropos commands
330 use the provided documentation instead of the documentation of the
331 aliased command.
332 Documenting a user-defined alias is particularly useful when the alias
333 is a set of nested 'with' commands to avoid showing the help of
334 the with command for an alias that will in fact launch the
335 last command given in the nested commands.
336
cc96ae7f
LS
337maintenance info line-table
338 Add a PROLOGUE-END column to the output which indicates that an
339 entry corresponds to an address where a breakpoint should be placed
340 to be at the first instruction past a function's prologue.
341
e26d0dab
SM
342* Removed commands
343
344set debug aix-solib on|off
345show debug aix-solib
346set debug solib-frv on|off
347show debug solib-frv
348 Removed in favor of "set/show debug solib".
349
5d80df4a
AB
350maintenance info program-spaces
351 This command now includes a 'Core File' column which indicates the
352 name of the core file associated with each program space.
353
02e85f7a
TY
354* New targets
355
356GNU/Linux/LoongArch (gdbserver) loongarch*-*-linux*
357
02cd1b4e
JL
358GNU/Linux/CSKY (gdbserver) csky*-*linux*
359
18b4d073
SM
360AMDGPU amdgcn-*-*
361
78805ff8
PW
362* MI changes
363
364 ** The async record stating the stopped reason 'breakpoint-hit' now
365 contains an optional field locno giving the code location number
366 when the breakpoint has multiple code locations.
367
25209e2c
AB
368* Python API
369
691ade38
TT
370 ** GDB will now reformat the doc string for gdb.Command and
371 gdb.Parameter sub-classes to remove unnecessary leading
372 whitespace from each line before using the string as the help
373 output.
374
25209e2c
AB
375 ** New function gdb.format_address(ADDRESS, PROGSPACE, ARCHITECTURE),
376 that formats ADDRESS as 'address <symbol+offset>', where symbol is
377 looked up in PROGSPACE, and ARCHITECTURE is used to format address.
378 This is the same format that GDB uses when printing address, symbol,
379 and offset information from the disassembler.
380
80fa4b2a
TT
381 ** New function gdb.current_language that returns the name of the
382 current language. Unlike gdb.parameter('language'), this will
383 never return 'auto'.
384
385 ** New method gdb.Frame.language that returns the name of the
386 frame's language.
387
15e15b2d
AB
388 ** New Python API for wrapping GDB's disassembler:
389
390 - gdb.disassembler.register_disassembler(DISASSEMBLER, ARCH).
391 DISASSEMBLER is a sub-class of gdb.disassembler.Disassembler.
392 ARCH is either None or a string containing a bfd architecture
393 name. DISASSEMBLER is registered as a disassembler for
394 architecture ARCH, or for all architectures if ARCH is None.
395 The previous disassembler registered for ARCH is returned, this
396 can be None if no previous disassembler was registered.
397
398 - gdb.disassembler.Disassembler is the class from which all
399 disassemblers should inherit. Its constructor takes a string,
400 a name for the disassembler, which is currently only used in
401 some debug output. Sub-classes should override the __call__
402 method to perform disassembly, invoking __call__ on this base
403 class will raise an exception.
404
405 - gdb.disassembler.DisassembleInfo is the class used to describe
406 a single disassembly request from GDB. An instance of this
407 class is passed to the __call__ method of
408 gdb.disassembler.Disassembler and has the following read-only
409 attributes: 'address', and 'architecture', as well as the
410 following method: 'read_memory'.
411
412 - gdb.disassembler.builtin_disassemble(INFO, MEMORY_SOURCE),
413 calls GDB's builtin disassembler on INFO, which is a
414 gdb.disassembler.DisassembleInfo object. MEMORY_SOURCE is
415 optional, its default value is None. If MEMORY_SOURCE is not
416 None then it must be an object that has a 'read_memory' method.
417
418 - gdb.disassembler.DisassemblerResult is a class that can be used
419 to wrap the result of a call to a Disassembler. It has
420 read-only attributes 'length' and 'string'.
421
99298c95
TT
422 ** gdb.Objfile now has an attribute named "is_file". This is True
423 if the objfile comes from a file, and False otherwise.
424
c4a3dbaf
TT
425 ** New function gdb.print_options that returns a dictionary of the
426 prevailing print options, in the form accepted by
427 gdb.Value.format_string.
428
429 ** gdb.Value.format_string now uses the format provided by 'print',
430 if it is called during a 'print' or other similar operation.
431
72be9d6b
TT
432 ** gdb.Value.format_string now accepts the 'summary' keyword. This
433 can be used to request a shorter representation of a value, the
434 way that 'set print frame-arguments scalars' does.
435
e5213e2c
SF
436 ** New Python type gdb.BreakpointLocation.
437 The new attribute 'locations' of gdb.Breakpoint returns a list of
438 gdb.BreakpointLocation objects specifying the locations where the
439 breakpoint is inserted into the debuggee.
440
7abc6ec0
AB
441 ** The gdb.register_window_type method now restricts the set of
442 acceptable window names. The first character of a window's name
443 must start with a character in the set [a-zA-Z], every subsequent
444 character of a window's name must be in the set [-_.a-zA-Z0-9].
445
02e85f7a
TY
446* New features in the GDB remote stub, GDBserver
447
448 ** GDBserver is now supported on LoongArch GNU/Linux.
02cd1b4e
JL
449
450 ** GDBserver is now supported on CSKY GNU/Linux.
02e85f7a 451
e24500cb
TY
452* LoongArch floating-point support
453
454GDB now supports floating-point on LoongArch GNU/Linux.
455
18b4d073
SM
456* AMD GPU ROCm debugging support
457
458GDB now supports debugging programs offloaded to AMD GPUs using the ROCm
459platform.
460
ba09d2a8 461*** Changes in GDB 12
ccd14903 462
cfeab26e
TT
463* DBX mode is deprecated, and will be removed in GDB 13
464
807310c5
AB
465* GDB 12 is the last release of GDB that will support building against
466 Python 2. From GDB 13, it will only be possible to build GDB itself
467 with Python 3 support.
468
bcb9251f
TT
469* The disable-randomization setting now works on Windows.
470
64a97606
KS
471* Improved C++ template support
472
473 GDB now treats functions/types involving C++ templates like it does function
474 overloads. Users may omit parameter lists to set breakpoints on families of
475 template functions, including types/functions composed of multiple template types:
476
477 (gdb) break template_func(template_1, int)
478
479 The above will set breakpoints at every function `template_func' where
480 the first function parameter is any template type named `template_1' and
481 the second function parameter is `int'.
482
483 TAB completion also gains similar improvements.
484
1ead4b8e
JB
485* The FreeBSD native target now supports async mode.
486
261b0748
LM
487* Configure changes
488
489--enable-threading
490
491 Enable or disable multithreaded symbol loading. This is enabled
492 by default, but passing --disable-threading or --enable-threading=no
493 to configure will disable it.
494
495 Disabling this can cause a performance penalty when there are a lot of
496 symbols to load, but is useful for debugging purposes.
497
fde1a9a3
AB
498* New commands
499
6aa4f97c
AB
500maint set backtrace-on-fatal-signal on|off
501maint show backtrace-on-fatal-signal
502 This setting is 'on' by default. When 'on' GDB will print a limited
503 backtrace to stderr in the situation where GDB terminates with a
504 fatal signal. This only supported on some platforms where the
505 backtrace and backtrace_symbols_fd functions are available.
506
fde1a9a3
AB
507set source open on|off
508show source open
509 This setting, which is on by default, controls whether GDB will try
510 to open source code files. Switching this off will stop GDB trying
511 to open and read source code files, which can be useful if the files
512 are located over a slow network connection.
513
acbf4a58
TT
514set varsize-limit
515show varsize-limit
516 These are now deprecated aliases for "set max-value-size" and
517 "show max-value-size".
518
bc75fb44
TT
519task apply [all | TASK-IDS...] [FLAG]... COMMAND
520 Like "thread apply", but applies COMMAND to Ada tasks.
521
8a18382f
TT
522watch [...] task ID
523 Watchpoints can now be restricted to a specific Ada task.
524
91f2597b
AB
525maint set internal-error backtrace on|off
526maint show internal-error backtrace
527maint set internal-warning backtrace on|off
528maint show internal-warning backtrace
529 GDB can now print a backtrace of itself when it encounters either an
530 internal-error, or an internal-warning. This is on by default for
531 internal-error and off by default for internal-warning.
532
6ff96754
TV
533set logging on|off
534 Deprecated and replaced by "set logging enabled on|off".
535
536set logging enabled on|off
537show logging enabled
538 These commands set or show whether logging is enabled or disabled.
539
fa8f0a0f
EL
540exit
541 You can now exit GDB by using the new command "exit", in addition to
542 the existing "quit" command.
543
5b0a3d62
AB
544set debug threads on|off
545show debug threads
546 Print additional debug messages about thread creation and deletion.
547
8864ef42
AB
548set debug linux-nat on|off
549show debug linux-nat
550 These new commands replaced the old 'set debug lin-lwp' and 'show
551 debug lin-lwp' respectively. Turning this setting on prints debug
552 messages relating to GDB's handling of native Linux inferiors.
553
39370778
AB
554maint flush source-cache
555 Flush the contents of the source code cache.
556
643b1268
AB
557maint set gnu-source-highlight enabled on|off
558maint show gnu-source-highlight enabled
559 Whether GDB should use the GNU Source Highlight library for adding
560 styling to source code. When off, the library will not be used, even
561 when available. When GNU Source Highlight isn't used, or can't add
562 styling to a particular source file, then the Python Pygments
563 library will be used instead.
564
61fb7376
TBA
565set suppress-cli-notifications (on|off)
566show suppress-cli-notifications
567 This controls whether printing the notifications is suppressed for CLI.
568 CLI notifications occur when you change the selected context
569 (i.e., the current inferior, thread and/or the frame), or when
570 the program being debugged stops (e.g., because of hitting a
571 breakpoint, completing source-stepping, an interrupt, etc.).
572
e867795e
AB
573set style disassembler enabled on|off
574show style disassembler enabled
575 If GDB is compiled with Python support, and the Python Pygments
576 package is available, then, when this setting is on, disassembler
577 output will have styling applied.
578
315e4ebb
TT
579set ada source-charset
580show ada source-charset
581 Set the character set encoding that is assumed for Ada symbols. Valid
582 values for this follow the values that can be passed to the GNAT
583 compiler via the '-gnati' option. The default is ISO-8859-1.
584
51c2a9e2
AB
585tui layout
586tui focus
587tui refresh
588tui window height
589 These are the new names for the old 'layout', 'focus', 'refresh',
590 and 'winheight' tui commands respectively. The old names still
591 exist as aliases to these new commands.
592
160444ec
AB
593tui window width
594winwidth
595 The new command 'tui window width', and the alias 'winwidth' allow
596 the width of a tui window to be adjusted when windows are laid out
597 in horizontal mode.
598
7421ccda
AB
599set debug tui on|off
600show debug tui
601 Control the display of debug output about GDB's tui.
602
e5b176f2
AB
603* Changed commands
604
56262a93
TT
605print
606 Printing of floating-point values with base-modifying formats like
607 /x has been changed to display the underlying bytes of the value in
608 the desired base. This was GDB's documented behavior, but was never
609 implemented correctly.
610
e5b176f2
AB
611maint packet
612 This command can now print a reply, if the reply includes
613 non-printable characters. Any non-printable characters are printed
614 as escaped hex, e.g. \x?? where '??' is replaces with the value of
615 the non-printable character.
616
003aae07
LS
617clone-inferior
618 The clone-inferior command now ensures that the TTY, CMD and ARGS
619 settings are copied from the original inferior to the new one.
620 All modifications to the environment variables done using the 'set
621 environment' or 'unset environment' commands are also copied to the new
622 inferior.
623
8864ef42
AB
624set debug lin-lwp on|off
625show debug lin-lwp
626 These commands have been removed from GDB. The new command 'set
627 debug linux-nat' and 'show debug linux-nat' should be used
628 instead.
629
f62843d7
AB
630info win
631 This command now includes information about the width of the tui
632 windows in its output.
633
51c2a9e2
AB
634layout
635focus
636refresh
637winheight
638 These commands are now aliases for the 'tui layout', 'tui focus',
639 'tui refresh', and 'tui window height' commands respectively.
640
63fc2437
TT
641* GDB's Ada parser now supports an extension for specifying the exact
642 byte contents of a floating-point literal. This can be useful for
643 setting floating-point registers to a precise value without loss of
644 precision. The syntax is an extension of the based literal syntax.
645 Use, e.g., "16lf#0123abcd#" -- the number of "l"s controls the width
646 of the floating-point type, and the "f" is the marker for floating
647 point.
648
d43bd54d
US
649* MI changes
650
651 ** The '-add-inferior' with no option flags now inherits the
652 connection of the current inferior, this restores the behaviour of
653 GDB as it was prior to GDB 10.
654
6fd90137
AB
655 ** The '-add-inferior' command now accepts a '--no-connection'
656 option, which causes the new inferior to start without a
657 connection.
658
9db0d853
SM
659 ** The default version of the MI interpreter is now 4 (-i=mi4).
660
661 ** The "script" field in breakpoint output (which is syntactically
662 incorrect in MI 3 and below) has changed in MI 4 to become a list.
663 This affects the following commands and events:
664
665 - -break-insert
666 - -break-info
667 - =breakpoint-created
668 - =breakpoint-modified
669
670 The -fix-breakpoint-script-output command can be used to enable
671 this behavior with previous MI versions.
672
d203a064
TY
673* New targets
674
575b4c29
PA
675GNU/Linux/LoongArch loongarch*-*-linux*
676
677* Removed targets
678
679S+core score-*-*
d203a064 680
540bf37b
AB
681* Python API
682
683 ** New function gdb.add_history(), which takes a gdb.Value object
684 and adds the value it represents to GDB's history list. An
685 integer, the index of the new item in the history list, is
686 returned.
687
30a87e90
AB
688 ** New function gdb.history_count(), which returns the number of
689 values in GDB's value history.
690
b1f0f284
AB
691 ** New gdb.events.gdb_exiting event. This event is called with a
692 gdb.GdbExitingEvent object which has the read-only attribute
693 'exit_code', which contains the value of the GDB exit code. This
694 event is triggered once GDB decides it is going to exit, but
695 before GDB starts to clean up its internal state.
696
8b87fbe6
AB
697 ** New function gdb.architecture_names(), which returns a list
698 containing all of the possible Architecture.name() values. Each
699 entry is a string.
700
d3771fe2
TT
701 ** New function gdb.Architecture.integer_type(), which returns an
702 integer type given a size and a signed-ness.
703
0e3b7c25 704 ** New gdb.TargetConnection object type that represents a connection
24b2de7b
AB
705 (as displayed by the 'info connections' command). A sub-class,
706 gdb.RemoteTargetConnection, is used to represent 'remote' and
707 'extended-remote' connections.
0e3b7c25
AB
708
709 ** The gdb.Inferior type now has a 'connection' property which is an
710 instance of gdb.TargetConnection, the connection used by this
711 inferior. This can be None if the inferior has no connection.
712
713 ** New 'gdb.events.connection_removed' event registry, which emits a
714 'gdb.ConnectionEvent' when a connection is removed from GDB.
715 This event has a 'connection' property, a gdb.TargetConnection
716 object for the connection being removed.
717
718 ** New gdb.connections() function that returns a list of all
719 currently active connections.
720
24b2de7b
AB
721 ** New gdb.RemoteTargetConnection.send_packet(PACKET) method. This
722 is equivalent to the existing 'maint packet' CLI command; it
723 allows a user specified packet to be sent to the remote target.
724
61671e97
AB
725 ** New function gdb.host_charset(), returns a string, which is the
726 name of the current host charset.
727
b583c328
TT
728 ** New gdb.set_parameter(NAME, VALUE). This sets the gdb parameter
729 NAME to VALUE.
730
731 ** New gdb.with_parameter(NAME, VALUE). This returns a context
732 manager that temporarily sets the gdb parameter NAME to VALUE,
733 then resets it when the context is exited.
734
0642912e
AB
735 ** The gdb.Value.format_string method now takes a 'styling'
736 argument, which is a boolean. When true, the returned string can
737 include escape sequences to apply styling. The styling will only
738 be present if styling is otherwise turned on in GDB (see 'help
739 set styling'). When false, which is the default if the argument
740 is not given, then no styling is applied to the returned string.
741
659971cb
AB
742 ** New read-only attribute gdb.InferiorThread.details, which is
743 either a string, containing additional, target specific thread
744 state information, or None, if there is no such additional
745 information.
746
ee6a3d9e
AB
747 ** New read-only attribute gdb.Type.is_scalar, which is True for
748 scalar types, and False for all other types.
749
551b380f
AB
750 ** New read-only attribute gdb.Type.is_signed. This attribute
751 should only be read when Type.is_scalar is True, and will be True
752 for signed types, and False for all other types. Attempting to
753 read this attribute for non-scalar types will raise a ValueError.
754
740b42ce
AB
755 ** It is now possible to add GDB/MI commands implemented in Python.
756
cb22a7c3
SH
757* New features in the GDB remote stub, GDBserver
758
759 ** GDBserver is now supported on OpenRISC GNU/Linux.
760
761* New native configurations
762
763GNU/Linux/OpenRISC or1k*-*-linux*
764
ccd14903 765*** Changes in GDB 11
ed6a896c 766
ae61ef2c
SV
767* The 'set disassembler-options' command now supports specifying options
768 for the ARC target.
769
ce192338
LM
770* GDB now supports general memory tagging functionality if the underlying
771 architecture supports the proper primitives and hooks. Currently this is
772 enabled only for AArch64 MTE.
773
774 This includes:
775
776 - Additional information when the inferior crashes with a SIGSEGV caused by
777 a memory tag violation.
778
779 - A new modifier 'm' for the "x" command, which displays allocation tags for a
780 particular memory range.
781
782 - Display of memory tag mismatches by "print", for addresses and
783 pointers, if memory tagging is supported by the architecture.
784
0fb8bb02
JB
785* Building GDB now requires GMP (The GNU Multiple Precision Arithmetic
786 Library).
787
6791b117
PA
788* MI changes
789
790 ** '-break-insert --qualified' and '-dprintf-insert --qualified'
791
792 The MI -break-insert and -dprintf-insert commands now support a
793 new "--qualified" option that makes GDB interpret a specified
794 function name as a complete fully-qualified name. This is the
795 equivalent of the CLI's "break -qualified" and "dprintf
796 -qualified".
797
10e578d7
TBA
798 ** '-break-insert --force-condition' and '-dprintf-insert --force-condition'
799
800 The MI -break-insert and -dprintf-insert commands now support a
801 '--force-condition' flag to forcibly define a condition even when
802 the condition is invalid at all locations of the breakpoint. This
803 is equivalent to the '-force-condition' flag of the CLI's "break"
804 command.
805
79aabb73
TBA
806 ** '-break-condition --force'
807
808 The MI -break-condition command now supports a '--force' flag to
809 forcibly define a condition even when the condition is invalid at
810 all locations of the selected breakpoint. This is equivalent to
811 the '-force' flag of the CLI's "cond" command.
812
1fb1ce02
AB
813 ** '-file-list-exec-source-files [--group-by-objfile]
814 [--basename | --dirname]
815 [--] [REGEXP]'
0e350a05
AB
816
817 The existing -file-list-exec-source-files command now takes an
818 optional REGEXP which is used to filter the source files that are
819 included in the results.
820
821 By default REGEXP is matched against the full filename of the
822 source file. When one of --basename or --dirname is given then
823 REGEXP is only matched against the specified part of the full
824 source filename.
825
1fb1ce02
AB
826 When the optional --group-by-objfile flag is used the output
827 format is changed, the results are now a list of object files
828 (executable and libraries) with the source files that are
829 associated with each object file.
830
0e350a05
AB
831 The results from -file-list-exec-source-files now include a
832 'debug-fully-read' field which takes the value 'true' or 'false'.
833 A 'true' value indicates the source file is from a compilation
834 unit that has had its debug information fully read in by GDB, a
835 value of 'false' indicates GDB has only performed a partial scan
836 of the debug information so far.
837
d3483b43
JT
838* GDB now supports core file debugging for x86_64 Cygwin programs.
839
64aaad63
AB
840* GDB will now look for the .gdbinit file in a config directory before
841 looking for ~/.gdbinit. The file is searched for in the following
842 locations: $XDG_CONFIG_HOME/gdb/gdbinit, $HOME/.config/gdb/gdbinit,
843 $HOME/.gdbinit. On Apple hosts the search order is instead:
844 $HOME/Library/Preferences/gdb/gdbinit, $HOME/.gdbinit.
845
fa123c32
JB
846* GDB now supports fixed point types which are described in DWARF
847 as base types with a fixed-point encoding. Additionally, support
848 for the DW_AT_GNU_numerator and DW_AT_GNU_denominator has also
849 been added.
850
851 For Ada, this allows support for fixed point types without requiring
852 the use of the GNAT encoding (based on information added to the type's
853 name following a GNAT-specific format).
854
92e4e97a
AB
855* GDB will now load and process commands from ~/.config/gdb/gdbearlyinit
856 or ~/.gdbearlyinit if these files are present. These files are
857 processed earlier than any of the other initialization files and
858 can affect parts of GDB's startup that previously had already been
859 completed before the initialization files were read, for example
860 styling of the initial GDB greeting.
861
862* GDB now has two new options "--early-init-command" and
863 "--early-init-eval-command" with corresponding short options "-eix"
864 and "-eiex" that allow options (that would normally appear in a
865 gdbearlyinit file) to be passed on the command line.
866
96f842cb
AB
867* For RISC-V targets, the target feature "org.gnu.gdb.riscv.vector" is
868 now understood by GDB, and can be used to describe the vector
869 registers of a target. The precise requirements of this register
870 feature are documented in the GDB manual.
871
ae66a8f1
SP
872* For ARM targets, the "org.gnu.gdb.arm.m-profile-mve" feature is now
873 supported by GDB and describes a new VPR register from the ARM MVE
874 (Helium) extension. See the GDB manual for more information.
875
90b044ef
PA
876* TUI improvements
877
878 ** TUI windows now support mouse actions. The mouse wheel scrolls
879 the appropriate window.
880
881 ** Key combinations that do not have a specific action on the
882 focused window are passed to GDB. For example, you now can use
883 Ctrl-Left/Ctrl-Right to move between words in the command window
884 regardless of which window is in focus. Previously you would
885 need to focus on the command window for such key combinations to
886 work.
887
8d378f27
SM
888* New commands
889
890set debug event-loop
891show debug event-loop
892 Control the display of debug output about GDB's event loop.
893
ce192338
LM
894set print memory-tag-violations
895show print memory-tag-violations
896 Control whether to display additional information about memory tag violations
897 when printing pointers and addresses. Architecture support for memory
898 tagging is required for this option to have an effect.
899
50a5f187
AB
900maintenance flush symbol-cache
901maintenance flush register-cache
902 These new commands are equivalent to the already existing commands
903 'maintenance flush-symbol-cache' and 'flushregs' respectively.
904
ee9812a0
AB
905maintenance flush dcache
906 A new command to flush the dcache.
907
02a79309
AB
908maintenance info target-sections
909 Print GDB's internal target sections table.
910
ff770835
SM
911maintenance info jit
912 Print the JIT code objects in the inferior known to GDB.
913
ce192338
LM
914memory-tag show-logical-tag POINTER
915 Print the logical tag for POINTER.
916memory-tag with-logical-tag POINTER TAG
917 Print POINTER with logical tag TAG.
918memory-tag show-allocation-tag ADDRESS
919 Print the allocation tag for ADDRESS.
920memory-tag set-allocation-tag ADDRESS LENGTH TAGS
921 Set the allocation tag for [ADDRESS, ADDRESS + LENGTH) to TAGS.
922memory-tag check POINTER
923 Validate that POINTER's logical tag matches the allocation tag.
924
5809fbf2
TT
925set startup-quietly on|off
926show startup-quietly
927 When 'on', this causes GDB to act as if "-silent" were passed on the
928 command line. This command needs to be added to an early
929 initialization file (e.g. ~/.config/gdb/gdbearlyinit) in order to
930 affect GDB.
931
fbb46296
LS
932set print type hex on|off
933show print type hex
934 When 'on', the 'ptype' command uses hexadecimal notation to print sizes
935 and offsets of struct members. When 'off', decimal notation is used.
936
edeaceda
AB
937set python ignore-environment on|off
938show python ignore-environment
939 When 'on', this causes GDB's builtin Python to ignore any
8eb82ba1 940 environment variables that would otherwise affect how Python
edeaceda
AB
941 behaves. This command needs to be added to an early initialization
942 file (e.g. ~/.config/gdb/gdbearlyinit) in order to affect GDB.
943
944set python dont-write-bytecode auto|on|off
945show python dont-write-bytecode
946 When 'on', this causes GDB's builtin Python to not write any
947 byte-code (.pyc files) to disk. This command needs to be added to
948 an early initialization file (e.g. ~/.config/gdb/gdbearlyinit) in
949 order to affect GDB. When 'off' byte-code will always be written.
950 When set to 'auto' (the default) Python will check the
8eb82ba1 951 PYTHONDONTWRITEBYTECODE environment variable.
edeaceda 952
733d554a
TBA
953* Changed commands
954
955break [PROBE_MODIFIER] [LOCATION] [thread THREADNUM]
956 [-force-condition] [if CONDITION]
957 This command would previously refuse setting a breakpoint if the
958 CONDITION expression is invalid at a location. It now accepts and
959 defines the breakpoint if there is at least one location at which
960 the CONDITION is valid. The locations for which the CONDITION is
961 invalid, are automatically disabled. If CONDITION is invalid at all
962 of the locations, setting the breakpoint is still rejected. However,
963 the '-force-condition' flag can be used in this case for forcing GDB to
964 define the breakpoint, making all the current locations automatically
965 disabled. This may be useful if the user knows the condition will
966 become meaningful at a future location, e.g. due to a shared library
967 load.
968
969condition [-force] N COND
970 The behavior of this command is changed the same way for the 'break'
971 command as explained above. The '-force' flag can be used to force
972 GDB into defining the condition even when COND is invalid for all the
973 current locations of breakpoint N.
974
50a5f187
AB
975flushregs
976maintenance flush-symbol-cache
977 These commands are deprecated in favor of the new commands
978 'maintenance flush register-cache' and 'maintenance flush
979 symbol-cache' respectively.
980
9d2d8a16
AB
981set style version foreground COLOR
982set style version background COLOR
983set style version intensity VALUE
984 Control the styling of GDB's version number text.
985
2e3773ff
LS
986inferior [ID]
987 When the ID parameter is omitted, then this command prints information
988 about the current inferior. When the ID parameter is present, the
989 behavior of the command is unchanged and have the inferior ID become
990 the current inferior.
991
bf3386f0
AB
992maintenance info sections
993 The ALLOBJ keyword has been replaced with an -all-objects command
994 line flag. It is now possible to filter which sections are printed
995 even when -all-objects is passed.
996
fbb46296
LS
997ptype[/FLAGS] TYPE | EXPRESSION
998 The 'ptype' command has two new flags. When '/x' is set, hexadecimal
999 notation is used when printing sizes and offsets of struct members.
1000 When '/d' is set, decimal notation is used when printing sizes and
1001 offsets of struct members. Default behavior is given by 'show print
1002 type hex'.
1003
bd742128
AB
1004info sources
1005 The info sources command output has been restructured. The results
1006 are now based around a list of objfiles (executable and libraries),
1007 and for each objfile the source files that are part of that objfile
1008 are listed.
1009
18b8df43
AM
1010* Removed targets and native configurations
1011
1012ARM Symbian arm*-*-symbianelf*
1013
ce192338
LM
1014* New remote packets
1015
1016qMemTags
1017 Request the remote to send allocation tags for a particular memory range.
1018QMemTags
1019 Request the remote to store the specified allocation tags to the requested
1020 memory range.
1021
97cef6b7
GB
1022* Guile API
1023
1024 ** Improved support for rvalue reference values:
1025 TYPE_CODE_RVALUE_REF is now exported as part of the API and the
1026 value-referenced-value procedure now handles rvalue reference
1027 values.
1028
ee35ce82
GB
1029 ** New procedures for obtaining value variants:
1030 value-reference-value, value-rvalue-reference-value and
1031 value-const-value.
9d4fc61d 1032
ad42014b
GB
1033 ** Temporary breakpoints can now be created with make-breakpoint and
1034 tested for using breakpoint-temporary?.
1035
55789354
TBA
1036* Python API
1037
1038 ** Inferior objects now contain a read-only 'connection_num' attribute that
1039 gives the connection number as seen in 'info connections' and
1040 'info inferiors'.
1041
d52b8007
AB
1042 ** New method gdb.Frame.level() which returns the stack level of the
1043 frame object.
1044
1045 ** New method gdb.PendingFrame.level() which returns the stack level
1046 of the frame object.
1047
6b95f5ad
AB
1048 ** When hitting a catchpoint, the Python API will now emit a
1049 gdb.BreakpointEvent rather than a gdb.StopEvent. The
1050 gdb.Breakpoint attached to the event will have type BP_CATCHPOINT.
1051
90b044ef
PA
1052 ** Python TUI windows can now receive mouse click events. If the
1053 Window object implements the click method, it is called for each
1054 mouse click event in this window.
1055
ed6a896c 1056*** Changes in GDB 10
4decd62b 1057
995d3a19
SV
1058* There are new feature names for ARC targets: "org.gnu.gdb.arc.core"
1059 and "org.gnu.gdb.arc.aux". The old names are still supported but
1060 must be considered obsolete. They will be deprecated after some
1061 grace period.
1062
5b4a1a8d
PW
1063* Help and apropos commands will now show the documentation of a
1064 command only once, even if that command has one or more aliases.
1065 These commands now show the command name, then all of its aliases,
1066 and finally the description of the command.
1067
1068* 'help aliases' now shows only the user defined aliases. GDB predefined
1069 aliases are shown together with their aliased command.
1070
0d79cdc4
AM
1071* GDB now supports debuginfod, an HTTP server for distributing ELF/DWARF
1072 debugging information as well as source code.
1073
1074 When built with debuginfod, GDB can automatically query debuginfod
1075 servers for the separate debug files and source code of the executable
1076 being debugged.
1077
1078 To build GDB with debuginfod, pass --with-debuginfod to configure (this
1079 requires libdebuginfod, the debuginfod client library).
1080
1081 debuginfod is distributed with elfutils, starting with version 0.178.
1082
1083 You can get the latest version from https://sourceware.org/elfutils.
1084
7cf663a9
PA
1085* Multi-target debugging support
1086
1087 GDB now supports debugging multiple target connections
1088 simultaneously. For example, you can now have each inferior
1089 connected to different remote servers running in different machines,
1090 or have one inferior debugging a local native process, an inferior
1091 debugging a core dump, etc.
1092
1093 This support is experimental and comes with some limitations -- you
1094 can only resume multiple targets simultaneously if all targets
1095 support non-stop mode, and all remote stubs or servers must support
1096 the same set of remote protocol features exactly. See also "info
1097 connections" and "add-inferior -no-connection" below, and "maint set
1098 target-non-stop" in the user manual.
1099
bf84f706
MR
1100* New features in the GDB remote stub, GDBserver
1101
ada508b6
SV
1102 ** GDBserver is now supported on ARC GNU/Linux.
1103
bf84f706
MR
1104 ** GDBserver is now supported on RISC-V GNU/Linux.
1105
6a17d503
SM
1106 ** GDBserver no longer supports these host triplets:
1107
1108 i[34567]86-*-lynxos*
1109 powerpc-*-lynxos*
1110 i[34567]86-*-nto*
1111 bfin-*-*linux*
1112 crisv32-*-linux*
1113 cris-*-linux*
1114 m32r*-*-linux*
1115 tilegx-*-linux*
1116 arm*-*-mingw32ce*
1117 i[34567]86-*-mingw32ce*
1118
3f602821
EZ
1119* Debugging MS-Windows processes now sets $_exitsignal when the
1120 inferior is terminated by a signal, instead of setting $_exitcode.
1121
8fb75323
CB
1122* Multithreaded symbol loading has now been enabled by default on systems
1123 that support it (see entry for GDB 9, below), providing faster
1124 performance for programs with many symbols.
1125
7928d571
HD
1126* The $_siginfo convenience variable now also works on Windows targets,
1127 and will display the EXCEPTION_RECORD of the last handled exception.
1128
7c043ba6 1129* TUI windows can now be arranged horizontally.
63e163f2
AB
1130
1131* The command history filename can now be set to the empty string
1132 either using 'set history filename' or by setting 'GDBHISTFILE=' in
1133 the environment. The effect of setting this filename to the empty
1134 string is that GDB will not try to load any previous command
1135 history.
46f9f931
HD
1136
1137* On Windows targets, it is now possible to debug 32-bit programs with a
1138 64-bit GDB.
7c043ba6 1139
e47e48f6
PW
1140* New commands
1141
1142set exec-file-mismatch -- Set exec-file-mismatch handling (ask|warn|off).
1143show exec-file-mismatch -- Show exec-file-mismatch handling (ask|warn|off).
98c59b52
PA
1144 Set or show the option 'exec-file-mismatch'. When GDB attaches to a
1145 running process, this new option indicates whether to detect
1146 a mismatch between the current executable file loaded by GDB and the
1147 executable file used to start the process. If 'ask', the default,
1148 display a warning and ask the user whether to load the process
1149 executable file; if 'warn', just display a warning; if 'off', don't
1150 attempt to detect a mismatch.
e47e48f6 1151
ee325b61
TT
1152tui new-layout NAME WINDOW WEIGHT [WINDOW WEIGHT]...
1153 Define a new TUI layout, specifying its name and the windows that
1154 will be displayed.
1155
caa7fd04
AB
1156maintenance print xml-tdesc [FILE]
1157 Prints the current target description as an XML document. If the
1158 optional FILE is provided (which is an XML target description) then
1159 the target description is read from FILE into GDB, and then
1160 reprinted.
1161
b089853a
KB
1162maintenance print core-file-backed-mappings
1163 Prints file-backed mappings loaded from a core file's note section.
1164 Output is expected to be similar to that of "info proc mappings".
1165
a5c641b5
AB
1166set debug fortran-array-slicing on|off
1167show debug fortran-array-slicing
1168 Print debugging when taking slices of Fortran arrays.
1169
1170set fortran repack-array-slices on|off
1171show fortran repack-array-slices
1172 When taking slices from Fortran arrays and strings, if the slice is
1173 non-contiguous within the original value then, when this option is
1174 on, the new value will be repacked into a single contiguous value.
1175 When this option is off, then the value returned will consist of a
1176 descriptor that describes the slice within the memory of the
1177 original parent value.
1178
5b860c93
PW
1179* Changed commands
1180
1181alias [-a] [--] ALIAS = COMMAND [DEFAULT-ARGS...]
1182 The alias command can now specify default args for an alias.
1183 GDB automatically prepends the alias default args to the argument list
1184 provided explicitly by the user.
1185 For example, to have a backtrace with full details, you can define
1186 an alias 'bt_ALL' as
1187 'alias bt_ALL = backtrace -entry-values both -frame-arg all
1188 -past-main -past-entry -full'.
1189 Alias default arguments can also use a set of nested 'with' commands,
1190 e.g. 'alias pp10 = with print pretty -- with print elem 10 -- print'
1191 defines the alias pp10 that will pretty print a maximum of 10 elements
1192 of the given expression (if the expression is an array).
1193
bf84f706
MR
1194* New targets
1195
1196GNU/Linux/RISC-V (gdbserver) riscv*-*-linux*
39791af2 1197BPF bpf-unknown-none
3dab9e15 1198Z80 z80-unknown-*
bf84f706 1199
01b1af32
TT
1200* Python API
1201
1202 ** gdb.register_window_type can be used to implement new TUI windows
1203 in Python.
1204
1acda803
TT
1205 ** Dynamic types can now be queried. gdb.Type has a new attribute,
1206 "dynamic", and gdb.Type.sizeof can be None for a dynamic type. A
1207 field of a dynamic type may have None for its "bitpos" attribute
1208 as well.
1209
2b2fbab8
TT
1210 ** Commands written in Python can be in the "TUI" help class by
1211 registering with the new constant gdb.COMMAND_TUI.
1212
87dbc774
AB
1213 ** New method gdb.PendingFrame.architecture () to retrieve the
1214 architecture of the pending frame.
1215
0f767f94
AB
1216 ** New gdb.Architecture.registers method that returns a
1217 gdb.RegisterDescriptorIterator object, an iterator that returns
1218 gdb.RegisterDescriptor objects. The new RegisterDescriptor is a
1219 way to query the registers available for an architecture.
1220
64cb3757
AB
1221 ** New gdb.Architecture.register_groups method that returns a
1222 gdb.RegisterGroupIterator object, an iterator that returns
1223 gdb.RegisterGroup objects. The new RegisterGroup is a way to
1224 discover the available register groups.
1225
68cf161c
LC
1226* Guile API
1227
ae5369e7 1228 ** GDB can now be built with GNU Guile 3.0 and 2.2 in addition to 2.0.
68cf161c
LC
1229
1230 ** Procedures 'memory-port-read-buffer-size',
1231 'set-memory-port-read-buffer-size!', 'memory-port-write-buffer-size',
1232 and 'set-memory-port-write-buffer-size!' are deprecated. When
1233 using Guile 2.2 and later, users who need to control the size of
1234 a memory port's internal buffer can use the 'setvbuf' procedure.
1235
4decd62b 1236*** Changes in GDB 9
9335e75a 1237
1a3da2cd
AB
1238* 'thread-exited' event is now available in the annotations interface.
1239
7734102d
EZ
1240* New built-in convenience variables $_gdb_major and $_gdb_minor
1241 provide the GDB version. They are handy for conditionally using
1242 features available only in or since specific GDB versions, in
1243 scripts that should work error-free with many different versions,
1244 such as in system-wide init files.
1245
aed61d02
PW
1246* New built-in convenience functions $_gdb_setting, $_gdb_setting_str,
1247 $_gdb_maint_setting and $_gdb_maint_setting_str provide access to values
1248 of the GDB settings and the GDB maintenance settings. They are handy
1249 for changing the logic of user defined commands depending on the
1250 current GDB settings.
1251
81a24d04
JB
1252* GDB now supports Thread Local Storage (TLS) variables on several
1253 FreeBSD architectures (amd64, i386, powerpc, riscv). Other
1254 architectures require kernel changes. TLS is not yet supported for
1255 amd64 and i386 process core dumps.
1256
3d31bc39
AH
1257* Support for Pointer Authentication (PAC) on AArch64 Linux. Return
1258 addresses that required unmasking are shown in the backtrace with the
1259 postfix [PAC].
d851aa71 1260
eb41253a 1261* Two new convenience functions $_cimag and $_creal that extract the
8bdc1658
AB
1262 imaginary and real parts respectively from complex numbers.
1263
52ce35e2
TT
1264* New built-in convenience variables $_shell_exitcode and $_shell_exitsignal
1265 provide the exitcode or exit status of the shell commands launched by
1266 GDB commands such as "shell", "pipe" and "make".
1267
bf498525
PW
1268* The command define-prefix can now define user defined prefix commands.
1269 User defined commands can now be defined using these user defined prefix
1270 commands.
1271
1272* Command names can now use the . character.
1273
e3ec872f
YS
1274* The RX port now supports XML target descriptions.
1275
4993045d
PW
1276* GDB now shows the Ada task names at more places, e.g. in task switching
1277 messages.
1278
6a062a93
CB
1279* GDB can now be compiled with Python 3 on Windows.
1280
37f6a7f4
TT
1281* New convenience variable $_ada_exception holds the address of the
1282 Ada exception being thrown. This is set by Ada-related catchpoints.
1283
179aed7f
AB
1284* GDB can now place breakpoints on nested functions and subroutines in
1285 Fortran code. The '::' operator can be used between parent and
1286 child scopes when placing breakpoints, for example:
1287
1288 (gdb) break outer_function::inner_function
1289
1290 The 'outer_function::' prefix is only needed if 'inner_function' is
1291 not visible in the current scope.
1292
ed2a2229
CB
1293* In addition to the system-wide gdbinit file, if configured with
1294 --with-system-gdbinit-dir, GDB will now also load files in that directory
1295 as system gdbinit files, unless the -nx or -n flag is provided. Files
1296 with extensions .gdb, .py and .scm are supported as long as GDB was
1297 compiled with support for that language.
1298
e49b22ff
CB
1299* GDB now supports multithreaded symbol loading for higher performance.
1300 This feature is still in testing, so it is disabled by default. You
1301 can turn it on using 'maint set worker-threads unlimited'.
1302
52093e1b
MB
1303* Python API
1304
1305 ** The gdb.Value type has a new method 'format_string' which returns a
1306 string representing the value. The formatting is controlled by the
1307 optional keyword arguments: 'raw', 'pretty_arrays', 'pretty_structs',
1308 'array_indexes', 'symbols', 'unions', 'deref_refs', 'actual_objects',
1309 'static_members', 'max_elements', 'repeat_threshold', and 'format'.
1310
e1f2e1a2
CB
1311 ** gdb.Type has a new property 'objfile' which returns the objfile the
1312 type was defined in.
1313
bc4268a5
PW
1314 ** The frame information printed by the python frame filtering code
1315 is now consistent with what the 'backtrace' command prints when
1316 there are no filters, or when the 'backtrace' '-no-filters' option
1317 is given.
1318
2906593f
CB
1319 ** The new function gdb.lookup_static_symbol can be used to look up
1320 symbols with static linkage.
1321
086baaf1
AB
1322 ** The new function gdb.lookup_static_symbols can be used to look up
1323 all static symbols with static linkage.
1324
c620ed88
CB
1325 ** gdb.Objfile has new methods 'lookup_global_symbol' and
1326 'lookup_static_symbol' to lookup a symbol from this objfile only.
1327
0b27c27d
CB
1328 ** gdb.Block now supports the dictionary syntax for accessing symbols in
1329 this block (e.g. block['local_variable']).
1330
136afab8
PW
1331* New commands
1332
e2c52041
PW
1333| [COMMAND] | SHELL_COMMAND
1334| -d DELIM COMMAND DELIM SHELL_COMMAND
1335pipe [COMMAND] | SHELL_COMMAND
1336pipe -d DELIM COMMAND DELIM SHELL_COMMAND
1337 Executes COMMAND and sends its output to SHELL_COMMAND.
1338 With no COMMAND, repeat the last executed command
1339 and send its output to SHELL_COMMAND.
1340
bf498525
PW
1341define-prefix COMMAND
1342 Define or mark a command as a user-defined prefix command.
1343
fdbc9870
PA
1344with SETTING [VALUE] [-- COMMAND]
1345w SETTING [VALUE] [-- COMMAND]
1346 Temporarily set SETTING, run COMMAND, and restore SETTING.
1347 Usage: with SETTING -- COMMAND
1348 With no COMMAND, repeats the last executed command.
1349 SETTING is any GDB setting you can change with the "set"
1350 subcommands. For example, 'with language c -- print someobj'
1351 temporarily switches to the C language in order to print someobj.
1352 Settings can be combined: 'w lang c -- w print elements unlimited --
1353 usercmd' switches to the C language and runs usercmd with no limit
1354 of array elements to print.
1355
1356maint with SETTING [VALUE] [-- COMMAND]
1357 Like "with", but works with "maintenance set" settings.
1358
136afab8
PW
1359set may-call-functions [on|off]
1360show may-call-functions
1361 This controls whether GDB will attempt to call functions in
1362 the program, such as with expressions in the print command. It
1363 defaults to on. Calling functions in the program being debugged
1364 can have undesired side effects. It is now possible to forbid
1365 such function calls. If function calls are forbidden, GDB will throw
1366 an error when a command (such as print expression) calls a function
1367 in the program.
1368
000439d5
TT
1369set print finish [on|off]
1370show print finish
1371 This controls whether the `finish' command will display the value
1372 that is returned by the current function. When `off', the value is
1373 still entered into the value history, but it is not printed. The
1374 default is `on'.
1375
1bd0c6e4
AB
1376set print max-depth
1377show print max-depth
1378 Allows deeply nested structures to be simplified when printing by
1379 replacing deeply nested parts (beyond the max-depth) with ellipses.
1380 The default max-depth is 20, but this can be set to unlimited to get
1381 the old behavior back.
1382
d8edc8b7
PW
1383set print raw-values [on|off]
1384show print raw-values
1385 By default, GDB applies the enabled pretty printers when printing a
1386 value. This allows to ignore the enabled pretty printers for a series
1387 of commands. The default is 'off'.
1388
b7060614
AH
1389set logging debugredirect [on|off]
1390 By default, GDB debug output will go to both the terminal and the logfile.
1391 Set if you want debug output to go only to the log file.
1392
e664d728
PW
1393set style title foreground COLOR
1394set style title background COLOR
1395set style title intensity VALUE
1396 Control the styling of titles.
1397
1398set style highlight foreground COLOR
1399set style highlight background COLOR
1400set style highlight intensity VALUE
1401 Control the styling of highlightings.
1402
22138db6
TT
1403maint set worker-threads
1404maint show worker-threads
1405 Control the number of worker threads that can be used by GDB. The
e49b22ff 1406 default is 0. "unlimited" lets GDB choose a number that is
22138db6
TT
1407 reasonable. Currently worker threads are only used when demangling
1408 the names of linker symbols.
1409
a2a7af0c
TT
1410set style tui-border foreground COLOR
1411set style tui-border background COLOR
1412 Control the styling of TUI borders.
1413
1414set style tui-active-border foreground COLOR
1415set style tui-active-border background COLOR
1416 Control the styling of the active TUI border.
1417
c6ac8931
PA
1418maint set test-settings KIND
1419maint show test-settings KIND
dca0f6c0
PA
1420 A set of commands used by the testsuite for exercising the settings
1421 infrastructure.
1422
45e42163
TT
1423maint set tui-resize-message [on|off]
1424maint show tui-resize-message
1425 Control whether GDB prints a message each time the terminal is
1426 resized when in TUI mode. This is primarily useful for testing the
1427 TUI.
1428
bc4268a5
PW
1429set print frame-info [short-location|location|location-and-address
1430 |source-and-location|source-line|auto]
1431show print frame-info
1432 This controls what frame information is printed by the commands printing
1433 a frame. This setting will e.g. influence the behaviour of 'backtrace',
1434 'frame', 'stepi'. The python frame filtering also respect this setting.
1435 The 'backtrace' '-frame-info' option can override this global setting.
1436
d1da6b01
TT
1437set tui compact-source
1438show tui compact-source
1439
1440 Enable the "compact" display mode for the TUI source window. The
1441 compact display uses only as much space as is needed for the line
1442 numbers in the current file, and only a single space to separate the
1443 line numbers from the source.
1444
59c35742
AB
1445info modules [-q] [REGEXP]
1446 Return a list of Fortran modules matching REGEXP, or all modules if
1447 no REGEXP is given.
1448
165f8965
AB
1449info module functions [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
1450 Return a list of functions within all modules, grouped by module.
1451 The list of functions can be restricted with the optional regular
1452 expressions. MODULE_REGEXP matches against the module name,
1453 TYPE_REGEXP matches against the function type signature, and REGEXP
1454 matches against the function name.
1455
1456info module variables [-q] [-m MODULE_REGEXP] [-t TYPE_REGEXP] [REGEXP]
1457 Return a list of variables within all modules, grouped by module.
1458 The list of variables can be restricted with the optional regular
1459 expressions. MODULE_REGEXP matches against the module name,
1460 TYPE_REGEXP matches against the variable type, and REGEXP matches
1461 against the variable name.
1462
6cc8564b
LM
1463set debug remote-packet-max-chars
1464show debug remote-packet-max-chars
1465 Controls the number of characters to output in a remote packet when using
1466 "set debug remote".
1467 The default is 512 bytes.
1468
65c574f6
PA
1469info connections
1470 Lists the target connections currently in use.
1471
e664d728
PW
1472* Changed commands
1473
1474help
1475 The "help" command uses the title style to enhance the
1476 readibility of its output by styling the classes and
1477 command names.
1478
1479apropos [-v] REGEXP
1480 Similarly to "help", the "apropos" command also uses the
1481 title style for the command names. "apropos" accepts now
1482 a flag "-v" (verbose) to show the full documentation
1483 of matching commands and to use the highlight style to mark
1484 the documentation parts matching REGEXP.
1485
1f6f6e21
PW
1486printf
1487eval
1488 The GDB printf and eval commands can now print C-style and Ada-style
1489 string convenience variables without calling functions in the program.
1490 This allows to do formatted printing of strings without having
1491 a running inferior, or when debugging a core dump.
1492
ae60f04e
PW
1493info sources [-dirname | -basename] [--] [REGEXP]
1494 This command has now optional arguments to only print the files
1495 whose names match REGEXP. The arguments -dirname and -basename
1496 allow to restrict matching respectively to the dirname and basename
1497 parts of the files.
1498
e664d728
PW
1499show style
1500 The "show style" and its subcommands are now styling
1501 a style name in their output using its own style, to help
1502 the user visualize the different styles.
1503
bc4268a5
PW
1504set print frame-arguments
1505 The new value 'presence' indicates to only indicate the presence of
1506 arguments using ..., instead of printing argument names and values.
1507
2daf894e
PA
1508set print raw-frame-arguments
1509show print raw-frame-arguments
1510
1511 These commands replace the similarly-named "set/show print raw
1512 frame-arguments" commands (now with a dash instead of a space). The
1513 old commands are now deprecated and may be removed in a future
1514 release.
e664d728 1515
65c574f6
PA
1516add-inferior [-no-connection]
1517 The add-inferior command now supports a "-no-connection" flag that
1518 makes the new inferior start with no target connection associated.
1519 By default, the new inferior inherits the target connection of the
1520 current inferior. See also "info connections".
1521
1522info inferior
1523 This command's output now includes a new "Connection" column
1524 indicating which target connection an inferior is bound to. See
1525 "info connections" above.
1526
3345721a
PA
1527maint test-options require-delimiter
1528maint test-options unknown-is-error
1529maint test-options unknown-is-operand
1530maint show test-options-completion-result
1531 Commands used by the testsuite to validate the command options
1532 framework.
1533
78e8cb91
TT
1534focus, winheight, +, -, >, <
1535 These commands are now case-sensitive.
1536
3345721a
PA
1537* New command options, command completion
1538
1539 GDB now has a standard infrastructure to support dash-style command
1540 options ('-OPT'). One benefit is that commands that use it can
1541 easily support completion of command line arguments. Try "CMD
1542 -[TAB]" or "help CMD" to find options supported by a command. Over
1543 time, we intend to migrate most commands to this infrastructure. A
1544 number of commands got support for new command options in this
1545 release:
1546
1547 ** The "print" and "compile print" commands now support a number of
1548 options that allow overriding relevant global print settings as
1549 set by "set print" subcommands:
1550
1551 -address [on|off]
1552 -array [on|off]
1553 -array-indexes [on|off]
1554 -elements NUMBER|unlimited
1555 -null-stop [on|off]
1556 -object [on|off]
1557 -pretty [on|off]
d8edc8b7 1558 -raw-values [on|off]
3345721a
PA
1559 -repeats NUMBER|unlimited
1560 -static-members [on|off]
1561 -symbol [on|off]
1562 -union [on|off]
1563 -vtbl [on|off]
1564
1565 Note that because the "print"/"compile print" commands accept
1566 arbitrary expressions which may look like options (including
1567 abbreviations), if you specify any command option, then you must
1568 use a double dash ("--") to mark the end of argument processing.
1569
1570 ** The "backtrace" command now supports a number of options that
1571 allow overriding relevant global print settings as set by "set
1572 backtrace" and "set print" subcommands:
1573
1574 -entry-values no|only|preferred|if-needed|both|compact|default
1575 -frame-arguments all|scalars|none
1576 -raw-frame-arguments [on|off]
bc4268a5
PW
1577 -frame-info auto|source-line|location|source-and-location
1578 |location-and-address|short-location
3345721a
PA
1579 -past-main [on|off]
1580 -past-entry [on|off]
1581
1582 In addition, the full/no-filters/hide qualifiers are now also
1583 exposed as command options too:
1584
1585 -full
1586 -no-filters
1587 -hide
1588
1589 ** The "frame apply", "tfaas" and "faas" commands similarly now
1590 support the following options:
1591
1592 -past-main [on|off]
1593 -past-entry [on|off]
1594
ae60f04e
PW
1595 ** The new "info sources" options -dirname and -basename options
1596 are using the standard '-OPT' infrastructure.
1597
3345721a
PA
1598 All options above can also be abbreviated. The argument of boolean
1599 (on/off) options can be 0/1 too, and also the argument is assumed
1600 "on" if omitted. This allows writing compact command invocations,
1601 like for example:
1602
d8edc8b7 1603 (gdb) p -ra -p -o 0 -- *myptr
3345721a
PA
1604
1605 The above is equivalent to:
1606
d8edc8b7 1607 (gdb) print -raw-values -pretty -object off -- *myptr
3345721a 1608
a8eab7c6
AB
1609 ** The "info types" command now supports the '-q' flag to disable
1610 printing of some header information in a similar fashion to "info
1611 variables" and "info functions".
1612
4acfdd20
AB
1613 ** The "info variables", "info functions", and "whereis" commands
1614 now take a '-n' flag that excludes non-debug symbols (symbols
1615 from the symbol table, not from the debug info such as DWARF)
1616 from the results.
1617
3345721a
PA
1618* Completion improvements
1619
1620 ** GDB can now complete the options of the "thread apply all" and
1621 "taas" commands, and their "-ascending" option can now be
1622 abbreviated.
1623
60cfcb20
AB
1624 ** GDB can now complete the options of the "info threads", "info
1625 functions", "info variables", "info locals", and "info args"
1626 commands.
54d66006 1627
3345721a
PA
1628 ** GDB can now complete the options of the "compile file" and
1629 "compile code" commands. The "compile file" command now
1630 completes on filenames.
1631
1632 ** GDB can now complete the backtrace command's
1633 "full/no-filters/hide" qualifiers.
1634
1635* In settings, you can now abbreviate "unlimited".
1636
1637 E.g., "set print elements u" is now equivalent to "set print
1638 elements unlimited".
1639
26648588
JV
1640* New MI commands
1641
1642-complete
1643 This lists all the possible completions for the rest of the line, if it
1644 were to be given as a command itself. This is intended for use by MI
1645 frontends in cases when separate CLI and MI channels cannot be used.
1646
30056ea0
AB
1647-catch-throw, -catch-rethrow, and -catch-catch
1648 These can be used to catch C++ exceptions in a similar fashion to
1649 the CLI commands 'catch throw', 'catch rethrow', and 'catch catch'.
1650
7dc42066
AB
1651-symbol-info-functions, -symbol-info-types, and -symbol-info-variables
1652 These commands are the MI equivalent of the CLI commands 'info
1653 functions', 'info types', and 'info variables' respectively.
1654
db5960b4
AB
1655-symbol-info-modules, this is the MI equivalent of the CLI 'info
1656 modules' command.
1657
293b38d6
AB
1658-symbol-info-module-functions and -symbol-info-module-variables.
1659 These commands are the MI equivalent of the CLI commands 'info
1660 module functions' and 'info module variables'.
1661
aa7ca1bb
AH
1662* Other MI changes
1663
5a3a0d63
JB
1664 ** The default version of the MI interpreter is now 3 (-i=mi3).
1665
1666 ** The output of information about multi-location breakpoints (which is
1667 syntactically incorrect in MI 2) has changed in MI 3. This affects
1668 the following commands and events:
1669
1670 - -break-insert
1671 - -break-info
1672 - =breakpoint-created
1673 - =breakpoint-modified
1674
1675 The -fix-multi-location-breakpoint-output command can be used to enable
1676 this behavior with previous MI versions.
1677
aa7ca1bb
AH
1678 ** Backtraces and frames include a new optional field addr_flags which is
1679 given after the addr field. On AArch64 this contains PAC if the address
1680 has been masked in the frame. On all other targets the field is not
1681 present.
1682
b7060614
AH
1683* Testsuite
1684
1685 The testsuite now creates the files gdb.cmd (containing the arguments
1686 used to launch GDB) and gdb.in (containing all the commands sent to
1687 GDB) in the output directory for each test script. Multiple invocations
1688 are appended with .1, .2, .3 etc.
1689
c6bdbeb7
AH
1690* Building GDB and GDBserver now requires GNU make >= 3.82.
1691
1692 Using another implementation of the make program or an earlier version of
1693 GNU make to build GDB or GDBserver is not supported.
1694
86c6b807
TT
1695* Building GDB now requires GNU readline >= 7.0.
1696
1697 GDB now bundles GNU readline 8.0, but if you choose to use
1698 --with-system-readline, only readline >= 7.0 can be used.
1699
11061048
TT
1700* The TUI SingleKey keymap is now named "SingleKey". This can be used
1701 from .inputrc to bind keys in this keymap. This feature is only
1702 available when gdb is built against GNU readline 8.0 or later.
1703
abf516c6
UW
1704* Removed targets and native configurations
1705
1706 GDB no longer supports debugging the Cell Broadband Engine. This includes
1707 both debugging standalone Cell/B.E. SPU applications and integrated debugging
1708 of Cell/B.E. applications that use both the PPU and SPU architectures.
1709
ddd44b70
DD
1710* New Simulators
1711
1712TI PRU pru-*-elf
1713
dae8b3eb
RO
1714* Removed targets and native configurations
1715
1716Solaris 10 i?86-*-solaris2.10, x86_64-*-solaris2.10,
1717 sparc*-*-solaris2.10
1718
9335e75a 1719*** Changes in GDB 8.3
4e5b2f89 1720
8d619c01
EBM
1721* GDB and GDBserver now support access to additional registers on
1722 PowerPC GNU/Linux targets: PPR, DSCR, TAR, EBB/PMU registers, and
1723 HTM registers.
1724
078a0207
KS
1725* GDB now has experimental support for the compilation and injection of
1726 C++ source code into the inferior. This beta release does not include
1727 support for several language features, such as templates, constructors,
1728 and operators.
1729
1730 This feature requires GCC 7.1 or higher built with libcp1.so
1731 (the C++ plug-in).
1732
c7ab0aef
SDJ
1733* GDB and GDBserver now support IPv6 connections. IPv6 addresses
1734 can be passed using the '[ADDRESS]:PORT' notation, or the regular
1735 'ADDRESS:PORT' method.
1736
7d11235d
SM
1737* DWARF index cache: GDB can now automatically save indices of DWARF
1738 symbols on disk to speed up further loading of the same binaries.
1739
e8bf1ce4
JB
1740* Ada task switching is now supported on aarch64-elf targets when
1741 debugging a program using the Ravenscar Profile. For more information,
1742 see the "Tasking Support when using the Ravenscar Profile" section
1743 in the GDB user manual.
1744
b0f492b9
GB
1745* GDB in batch mode now exits with status 1 if the last command to be
1746 executed failed.
1747
b5ffee31
AB
1748* The RISC-V target now supports target descriptions.
1749
e9076973
JB
1750* System call catchpoints now support system call aliases on FreeBSD.
1751 When the ABI of a system call changes in FreeBSD, this is
1752 implemented by leaving a compatibility system call using the old ABI
1753 at the existing number and allocating a new system call number for
1754 the new ABI. For example, FreeBSD 12 altered the layout of 'struct
1755 kevent' used by the 'kevent' system call. As a result, FreeBSD 12
1756 kernels ship with both 'kevent' and 'freebsd11_kevent' system calls.
1757 The 'freebsd11_kevent' system call is assigned an alias of 'kevent'
1758 so that a system call catchpoint for the 'kevent' system call will
1759 catch invocations of both the 'kevent' and 'freebsd11_kevent'
1760 binaries. This ensures that 'kevent' system calls are caught for
1761 binaries using either the old or new ABIs.
1762
140a4bc0
TT
1763* Terminal styling is now available for the CLI and the TUI. GNU
1764 Source Highlight can additionally be used to provide styling of
1765 source code snippets. See the "set style" commands, below, for more
1766 information.
1767
041be526
SM
1768* Removed support for old demangling styles arm, edg, gnu, hp and
1769 lucid.
1770
a14c4daa
PW
1771* New commands
1772
078a0207
KS
1773set debug compile-cplus-types
1774show debug compile-cplus-types
1775 Control the display of debug output about type conversion in the
82f06518 1776 C++ compile feature. Commands have no effect while compiling
078a0207
KS
1777 for other languages.
1778
3e68067f
SM
1779set debug skip
1780show debug skip
1781 Control whether debug output about files/functions skipping is
1782 displayed.
1783
a14c4daa
PW
1784frame apply [all | COUNT | -COUNT | level LEVEL...] [FLAG]... COMMAND
1785 Apply a command to some frames.
1786 FLAG arguments allow to control what output to produce and how to handle
1787 errors raised when applying COMMAND to a frame.
1788
1789taas COMMAND
1790 Apply a command to all threads (ignoring errors and empty output).
1791 Shortcut for 'thread apply all -s COMMAND'.
1792
1793faas COMMAND
1794 Apply a command to all frames (ignoring errors and empty output).
1795 Shortcut for 'frame apply all -s COMMAND'.
1796
1797tfaas COMMAND
1798 Apply a command to all frames of all threads (ignoring errors and empty
1799 output).
1800 Shortcut for 'thread apply all -s frame apply all -s COMMAND'.
1801
3c3bb058
AB
1802maint set dwarf unwinders (on|off)
1803maint show dwarf unwinders
1804 Control whether DWARF unwinders can be used.
1805
8b113111
JB
1806info proc files
1807 Display a list of open files for a process.
1808
a14c4daa
PW
1809* Changed commands
1810
669e09f6
PW
1811Changes to the "frame", "select-frame", and "info frame" CLI commands.
1812 These commands all now take a frame specification which
1813 is either a frame level, or one of the keywords 'level', 'address',
1814 'function', or 'view' followed by a parameter. Selecting a frame by
1815 address, or viewing a frame outside the current backtrace now
1816 requires the use of a keyword. Selecting a frame by level is
1817 unchanged. The MI comment "-stack-select-frame" is unchanged.
1818
c1168a2f
JD
1819target remote FILENAME
1820target extended-remote FILENAME
1821 If FILENAME is a Unix domain socket, GDB will attempt to connect
1822 to this socket instead of opening FILENAME as a character device.
1823
e0a7911f
PW
1824info args [-q] [-t TYPEREGEXP] [NAMEREGEXP]
1825info functions [-q] [-t TYPEREGEXP] [NAMEREGEXP]
1826info locals [-q] [-t TYPEREGEXP] [NAMEREGEXP]
1827info variables [-q] [-t TYPEREGEXP] [NAMEREGEXP]
1828 These commands can now print only the searched entities
1829 matching the provided regexp(s), giving a condition
1830 on the entity names or entity types. The flag -q disables
1831 printing headers or informations messages.
1832
604c4ca9
PW
1833info functions
1834info types
1835info variables
1836rbreak
1837 These commands now determine the syntax for the shown entities
1838 according to the language chosen by `set language'. In particular,
1839 `set language auto' means to automatically choose the language of
1840 the shown entities.
1841
a14c4daa
PW
1842thread apply [all | COUNT | -COUNT] [FLAG]... COMMAND
1843 The 'thread apply' command accepts new FLAG arguments.
1844 FLAG arguments allow to control what output to produce and how to handle
1845 errors raised when applying COMMAND to a thread.
1846
7806cea7
TT
1847set tui tab-width NCHARS
1848show tui tab-width NCHARS
1849 "set tui tab-width" replaces the "tabset" command, which has been deprecated.
1850
140a4bc0
TT
1851set style enabled [on|off]
1852show style enabled
1853 Enable or disable terminal styling. Styling is enabled by default
7557a514 1854 on most hosts, but disabled by default when in batch mode.
140a4bc0 1855
d085f989
TT
1856set style sources [on|off]
1857show style sources
1858 Enable or disable source code styling. Source code styling is
1859 enabled by default, but only takes effect if styling in general is
1860 enabled, and if GDB was linked with GNU Source Highlight.
1861
140a4bc0
TT
1862set style filename foreground COLOR
1863set style filename background COLOR
1864set style filename intensity VALUE
1865 Control the styling of file names.
1866
1867set style function foreground COLOR
1868set style function background COLOR
1869set style function intensity VALUE
1870 Control the styling of function names.
1871
1872set style variable foreground COLOR
1873set style variable background COLOR
1874set style variable intensity VALUE
1875 Control the styling of variable names.
1876
1877set style address foreground COLOR
1878set style address background COLOR
1879set style address intensity VALUE
1880 Control the styling of addresses.
1881
26fb3983
JV
1882* MI changes
1883
1884 ** The '-data-disassemble' MI command now accepts an '-a' option to
1885 disassemble the whole function surrounding the given program
1886 counter value or function name. Support for this feature can be
1887 verified by using the "-list-features" command, which should
1888 contain "data-disassemble-a-option".
1889
6d52907e
JV
1890 ** Command responses and notifications that include a frame now include
1891 the frame's architecture in a new "arch" attribute.
1892
52a187f8
JW
1893* New native configurations
1894
1895GNU/Linux/RISC-V riscv*-*-linux*
74792ff7 1896FreeBSD/riscv riscv*-*-freebsd*
52a187f8
JW
1897
1898* New targets
1899
1900GNU/Linux/RISC-V riscv*-*-linux*
416a69af
HAQ
1901CSKY ELF csky*-*-elf
1902CSKY GNU/LINUX csky*-*-linux
ed65e20b 1903FreeBSD/riscv riscv*-*-freebsd*
197df35e
JB
1904NXP S12Z s12z-*-elf
1905GNU/Linux/OpenRISC or1k*-*-linux*
52a187f8 1906
742a7df5
EZ
1907* Removed targets
1908
1909GDB no longer supports native debugging on versions of MS-Windows
1910before Windows XP.
1911
a40bf0c2
SM
1912* Python API
1913
2c3fc25d
KB
1914 ** GDB no longer supports Python versions less than 2.6.
1915
a40bf0c2
SM
1916 ** The gdb.Inferior type has a new 'progspace' property, which is the program
1917 space associated to that inferior.
1918
0ae1a321
SM
1919 ** The gdb.Progspace type has a new 'objfiles' method, which returns the list
1920 of objfiles associated to that program space.
1921
51e78fc5
TT
1922 ** gdb.SYMBOL_LOC_COMMON_BLOCK, gdb.SYMBOL_MODULE_DOMAIN, and
1923 gdb.SYMBOL_COMMON_BLOCK_DOMAIN were added to reflect changes to
1924 the gdb core.
1925
1926 ** gdb.SYMBOL_VARIABLES_DOMAIN, gdb.SYMBOL_FUNCTIONS_DOMAIN, and
1927 gdb.SYMBOL_TYPES_DOMAIN are now deprecated. These were never
1928 correct and did not work properly.
1929
af54ade9
KB
1930 ** The gdb.Value type has a new constructor, which is used to construct a
1931 gdb.Value from a Python buffer object and a gdb.Type.
1932
f35d5ade
TT
1933* Configure changes
1934
1935--enable-ubsan
1936
eff98030
TT
1937 Enable or disable the undefined behavior sanitizer. This is
1938 disabled by default, but passing --enable-ubsan=yes or
1939 --enable-ubsan=auto to configure will enable it. Enabling this can
1940 cause a performance penalty. The undefined behavior sanitizer was
1941 first introduced in GCC 4.9.
f35d5ade 1942
4e5b2f89 1943*** Changes in GDB 8.2
cd385f94 1944
471b9d15
MR
1945* The 'set disassembler-options' command now supports specifying options
1946 for the MIPS target.
1947
d4d429d5
PT
1948* The 'symbol-file' command now accepts an '-o' option to add a relative
1949 offset to all sections.
1950
291f9a96
PT
1951* Similarly, the 'add-symbol-file' command also accepts an '-o' option to add
1952 a relative offset to all sections, but it allows to override the load
1953 address of individual sections using '-s'.
1954
ed6dfe51
PT
1955* The 'add-symbol-file' command no longer requires the second argument
1956 (address of the text section).
1957
4b2dfa9d
MR
1958* The endianness used with the 'set endian auto' mode in the absence of
1959 an executable selected for debugging is now the last endianness chosen
1960 either by one of the 'set endian big' and 'set endian little' commands
1961 or by inferring from the last executable used, rather than the startup
1962 default.
1963
eb6af809
TT
1964* The pager now allows a "c" response, meaning to disable the pager
1965 for the rest of the current command.
1966
b744723f
AA
1967* The commands 'info variables/functions/types' now show the source line
1968 numbers of symbol definitions when available.
1969
2d97a5d9
JB
1970* 'info proc' now works on running processes on FreeBSD systems and core
1971 files created on FreeBSD systems.
1972
007e1530
TT
1973* C expressions can now use _Alignof, and C++ expressions can now use
1974 alignof.
1975
1461bdac
AH
1976* Support for SVE on AArch64 Linux. Note that GDB does not detect changes to
1977 the vector length while the process is running.
1978
386a8676
JB
1979* New commands
1980
1981set debug fbsd-nat
1982show debug fbsd-nat
1983 Control display of debugging info regarding the FreeBSD native target.
1984
3fcded8f
JB
1985set|show varsize-limit
1986 This new setting allows the user to control the maximum size of Ada
1987 objects being printed when those objects have a variable type,
1988 instead of that maximum size being hardcoded to 65536 bytes.
1989
4a4495d6
MM
1990set|show record btrace cpu
1991 Controls the processor to be used for enabling errata workarounds for
1992 branch trace decode.
1993
5045b3d7
GB
1994maint check libthread-db
1995 Run integrity checks on the current inferior's thread debugging
1996 library
1997
1998maint set check-libthread-db (on|off)
1999maint show check-libthread-db
2000 Control whether to run integrity checks on inferior specific thread
2001 debugging libraries as they are loaded. The default is not to
2002 perform such checks.
2003
6d7bb824
TT
2004* Python API
2005
2006 ** Type alignment is now exposed via the "align" attribute of a gdb.Type.
2007
a913fffb
TT
2008 ** The commands attached to a breakpoint can be set by assigning to
2009 the breakpoint's "commands" field.
2010
56bcdbea
TT
2011 ** gdb.execute can now execute multi-line gdb commands.
2012
7729052b
TT
2013 ** The new functions gdb.convenience_variable and
2014 gdb.set_convenience_variable can be used to get and set the value
2015 of convenience variables.
2016
984ee559
TT
2017 ** A gdb.Parameter will no longer print the "set" help text on an
2018 ordinary "set"; instead by default a "set" will be silent unless
2019 the get_set_string method returns a non-empty string.
2020
dbbb1059
AB
2021* New targets
2022
2023RiscV ELF riscv*-*-elf
2024
a2a79012
PA
2025* Removed targets and native configurations
2026
2027m88k running OpenBSD m88*-*-openbsd*
8a3de5e1
PA
2028SH-5/SH64 ELF sh64-*-elf*, SH-5/SH64 support in sh*
2029SH-5/SH64 running GNU/Linux SH-5/SH64 support in sh*-*-linux*
2030SH-5/SH64 running OpenBSD SH-5/SH64 support in sh*-*-openbsd*
a2a79012 2031
a3b60e45
JK
2032* Aarch64/Linux hardware watchpoints improvements
2033
2034 Hardware watchpoints on unaligned addresses are now properly
2035 supported when running Linux kernel 4.10 or higher: read and access
2036 watchpoints are no longer spuriously missed, and all watchpoints
2037 lengths between 1 and 8 bytes are supported. On older kernels,
2038 watchpoints set on unaligned addresses are no longer missed, with
2039 the tradeoff that there is a possibility of false hits being
2040 reported.
2041
056dec39 2042* Configure changes
44cee4fd
TT
2043
2044--enable-codesign=CERT
2045 This can be used to invoke "codesign -s CERT" after building gdb.
2046 This option is useful on macOS, where code signing is required for
2047 gdb to work properly.
2048
056dec39
TT
2049--disable-gdbcli has been removed
2050 This is now silently accepted, but does nothing.
2051
cd385f94 2052*** Changes in GDB 8.1
305d16a9 2053
cef0f868
SH
2054* GDB now supports dynamically creating arbitrary register groups specified
2055 in XML target descriptions. This allows for finer grain grouping of
2056 registers on systems with a large amount of registers.
2057
7c161838
SDJ
2058* The 'ptype' command now accepts a '/o' flag, which prints the
2059 offsets and sizes of fields in a struct, like the pahole(1) tool.
2060
97cbe998
SDJ
2061* New "--readnever" command line option instructs GDB to not read each
2062 symbol file's symbolic debug information. This makes startup faster
2063 but at the expense of not being able to perform symbolic debugging.
2064 This option is intended for use cases where symbolic debugging will
2065 not be used, e.g., when you only need to dump the debuggee's core.
2066
2400729e
UW
2067* GDB now uses the GNU MPFR library, if available, to emulate target
2068 floating-point arithmetic during expression evaluation when the target
2069 uses different floating-point formats than the host. At least version
2070 3.1 of GNU MPFR is required.
2071
289e23aa
AA
2072* GDB now supports access to the guarded-storage-control registers and the
2073 software-based guarded-storage broadcast control registers on IBM z14.
2074
0a2dde4a
SDJ
2075* On Unix systems, GDB now supports transmitting environment variables
2076 that are to be set or unset to GDBserver. These variables will
2077 affect the environment to be passed to the remote inferior.
2078
2079 To inform GDB of environment variables that are to be transmitted to
2080 GDBserver, use the "set environment" command. Only user set
2081 environment variables are sent to GDBserver.
2082
2083 To inform GDB of environment variables that are to be unset before
2084 the remote inferior is started by the GDBserver, use the "unset
2085 environment" command.
2086
d044bac8
PA
2087* Completion improvements
2088
2089 ** GDB can now complete function parameters in linespecs and
2090 explicit locations without quoting. When setting breakpoints,
2091 quoting around functions names to help with TAB-completion is
2092 generally no longer necessary. For example, this now completes
2093 correctly:
2094
2095 (gdb) b function(in[TAB]
2096 (gdb) b function(int)
2097
2098 Related, GDB is no longer confused with completing functions in
2099 C++ anonymous namespaces:
2100
2101 (gdb) b (anon[TAB]
2102 (gdb) b (anonymous namespace)::[TAB][TAB]
2103 (anonymous namespace)::a_function()
2104 (anonymous namespace)::b_function()
2105
2106 ** GDB now has much improved linespec and explicit locations TAB
2107 completion support, that better understands what you're
2108 completing and offers better suggestions. For example, GDB no
2109 longer offers data symbols as possible completions when you're
2110 setting a breakpoint.
2111
2112 ** GDB now TAB-completes label symbol names.
2113
2114 ** The "complete" command now mimics TAB completion accurately.
2115
c179febe
SL
2116* New command line options (gcore)
2117
2118-a
2119 Dump all memory mappings.
2120
a20714ff
PA
2121* Breakpoints on C++ functions are now set on all scopes by default
2122
2123 By default, breakpoints on functions/methods are now interpreted as
2124 specifying all functions with the given name ignoring missing
2125 leading scopes (namespaces and classes).
2126
2127 For example, assuming a C++ program with symbols named:
2128
2129 A::B::func()
2130 B::func()
2131
2132 both commands "break func()" and "break B::func()" set a breakpoint
2133 on both symbols.
2134
2135 You can use the new flag "-qualified" to override this. This makes
2136 GDB interpret the specified function name as a complete
2137 fully-qualified name instead. For example, using the same C++
2138 program, the "break -q B::func" command sets a breakpoint on
b89641ba
SM
2139 "B::func", only. A parameter has been added to the Python
2140 gdb.Breakpoint constructor to achieve the same result when creating
2141 a breakpoint from Python.
a20714ff 2142
bd69330d
PA
2143* Breakpoints on functions marked with C++ ABI tags
2144
2145 GDB can now set breakpoints on functions marked with C++ ABI tags
2146 (e.g., [abi:cxx11]). See here for a description of ABI tags:
2147 https://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/
2148
2149 Functions with a C++11 abi tag are demangled/displayed like this:
2150
2151 function[abi:cxx11](int)
2152 ^^^^^^^^^^^
2153
2154 You can now set a breakpoint on such functions simply as if they had
2155 no tag, like:
2156
2157 (gdb) b function(int)
2158
2159 Or if you need to disambiguate between tags, like:
2160
2161 (gdb) b function[abi:other_tag](int)
2162
2163 Tab completion was adjusted accordingly as well.
2164
7c96f8c1
TT
2165* Python Scripting
2166
2167 ** New events gdb.new_inferior, gdb.inferior_deleted, and
2168 gdb.new_thread are emitted. See the manual for further
2169 description of these.
2170
4e725347
JB
2171 ** A new function, "gdb.rbreak" has been added to the Python API.
2172 This function allows the setting of a large number of breakpoints
2173 via a regex pattern in Python. See the manual for further details.
d8ae99a7 2174
824cc835
PM
2175 ** Python breakpoints can now accept explicit locations. See the
2176 manual for a further description of this feature.
2177
2178
6d580b63
YQ
2179* New features in the GDB remote stub, GDBserver
2180
bc3b087d
SDJ
2181 ** GDBserver is now able to start inferior processes with a
2182 specified initial working directory.
2183
2184 The user can set the desired working directory to be used from
2185 GDB using the new "set cwd" command.
2186
6d580b63
YQ
2187 ** New "--selftest" command line option runs some GDBserver self
2188 tests. These self tests are disabled in releases.
2189
2190 ** On Unix systems, GDBserver now does globbing expansion and variable
2191 substitution in inferior command line arguments.
2192
2193 This is done by starting inferiors using a shell, like GDB does.
2194 See "set startup-with-shell" in the user manual for how to disable
2195 this from GDB when using "target extended-remote". When using
2196 "target remote", you can disable the startup with shell by using the
2197 new "--no-startup-with-shell" GDBserver command line option.
aefd8b33 2198
0a2dde4a
SDJ
2199 ** On Unix systems, GDBserver now supports receiving environment
2200 variables that are to be set or unset from GDB. These variables
2201 will affect the environment to be passed to the inferior.
2202
e547c119
JB
2203* When catching an Ada exception raised with a message, GDB now prints
2204 the message in the catchpoint hit notification. In GDB/MI mode, that
2205 information is provided as an extra field named "exception-message"
2206 in the *stopped notification.
2207
7403715e
TT
2208* Trait objects can now be inspected When debugging Rust code. This
2209 requires compiler support which will appear in Rust 1.24.
2210
aefd8b33
SDJ
2211* New remote packets
2212
0a2dde4a
SDJ
2213QEnvironmentHexEncoded
2214 Inform GDBserver of an environment variable that is to be passed to
2215 the inferior when starting it.
2216
2217QEnvironmentUnset
2218 Inform GDBserver of an environment variable that is to be unset
2219 before starting the remote inferior.
2220
2221QEnvironmentReset
2222 Inform GDBserver that the environment should be reset (i.e.,
2223 user-set environment variables should be unset).
2224
aefd8b33
SDJ
2225QStartupWithShell
2226 Indicates whether the inferior must be started with a shell or not.
2227
bc3b087d
SDJ
2228QSetWorkingDir
2229 Tell GDBserver that the inferior to be started should use a specific
2230 working directory.
2231
8e2141c6
YQ
2232* The "maintenance print c-tdesc" command now takes an optional
2233 argument which is the file name of XML target description.
2234
1526853e
SM
2235* The "maintenance selftest" command now takes an optional argument to
2236 filter the tests to be run.
2237
d0fe4701
XR
2238* The "enable", and "disable" commands now accept a range of
2239 breakpoint locations, e.g. "enable 1.3-5".
2240
c4dcb155
SM
2241* New commands
2242
d092c5a2
SDJ
2243set|show cwd
2244 Set and show the current working directory for the inferior.
2245
6e41ddec
JK
2246set|show compile-gcc
2247 Set and show compilation command used for compiling and injecting code
2248 with the 'compile' commands.
2249
c4dcb155
SM
2250set debug separate-debug-file
2251show debug separate-debug-file
2252 Control the display of debug output about separate debug file search.
2253
1e52e849
SL
2254set dump-excluded-mappings
2255show dump-excluded-mappings
2256 Control whether mappings marked with the VM_DONTDUMP flag should be
2257 dumped when generating a core file.
2258
1526853e
SM
2259maint info selftests
2260 List the registered selftests.
2261
4e5a4f58
JB
2262starti
2263 Start the debugged program stopping at the first instruction.
2264
b282f0f2
SH
2265set|show debug or1k
2266 Control display of debugging messages related to OpenRISC targets.
2267
883fd55a
KS
2268set|show print type nested-type-limit
2269 Set and show the limit of nesting level for nested types that the
2270 type printer will show.
2271
44d0fb3a
RK
2272* TUI Single-Key mode now supports two new shortcut keys: `i' for stepi and
2273 `o' for nexti.
2274
d69cf9b2
PA
2275* Safer/improved support for debugging with no debug info
2276
2277 GDB no longer assumes functions with no debug information return
2278 'int'.
2279
2280 This means that GDB now refuses to call such functions unless you
2281 tell it the function's type, by either casting the call to the
2282 declared return type, or by casting the function to a function
2283 pointer of the right type, and calling that:
2284
2285 (gdb) p getenv ("PATH")
2286 'getenv' has unknown return type; cast the call to its declared return type
2287 (gdb) p (char *) getenv ("PATH")
2288 $1 = 0x7fffffffe "/usr/local/bin:/"...
2289 (gdb) p ((char * (*) (const char *)) getenv) ("PATH")
2290 $2 = 0x7fffffffe "/usr/local/bin:/"...
2291
2292 Similarly, GDB no longer assumes that global variables with no debug
2293 info have type 'int', and refuses to print the variable's value
2294 unless you tell it the variable's type:
2295
2296 (gdb) p var
2297 'var' has unknown type; cast it to its declared type
2298 (gdb) p (float) var
2299 $3 = 3.14
2300
351787dd
JB
2301* New native configurations
2302
2303FreeBSD/aarch64 aarch64*-*-freebsd*
4f9d9906 2304FreeBSD/arm arm*-*-freebsd*
351787dd 2305
c0f84956
JB
2306* New targets
2307
2308FreeBSD/aarch64 aarch64*-*-freebsd*
7176dfd2 2309FreeBSD/arm arm*-*-freebsd*
b282f0f2 2310OpenRISC ELF or1k*-*-elf
c0f84956 2311
281c4447
RO
2312* Removed targets and native configurations
2313
2314Solaris 2.0-9 i?86-*-solaris2.[0-9], sparc*-*-solaris2.[0-9]
2315
305d16a9 2316*** Changes in GDB 8.0
51547df6
MS
2317
2318* GDB now supports access to the PKU register on GNU/Linux. The register is
2319 added by the Memory Protection Keys for Userspace feature which will be
2320 available in future Intel CPUs.
751b375e 2321
c0f55cc6
AV
2322* GDB now supports C++11 rvalue references.
2323
0a0faf9f
TW
2324* Python Scripting
2325
2326 ** New functions to start, stop and access a running btrace recording.
c0f55cc6 2327 ** Rvalue references are now supported in gdb.Type.
0a0faf9f 2328
20b477a7
LM
2329* GDB now supports recording and replaying rdrand and rdseed Intel 64
2330 instructions.
2331
e6485aaf 2332* Building GDB and GDBserver now requires a C++11 compiler.
d2946923
PA
2333
2334 For example, GCC 4.8 or later.
cf6de44d
PA
2335
2336 It is no longer possible to build GDB or GDBserver with a C
2337 compiler. The --disable-build-with-cxx configure option has been
2338 removed.
2339
f2ff9acd
SM
2340* Building GDB and GDBserver now requires GNU make >= 3.81.
2341
2342 It is no longer supported to build GDB or GDBserver with another
2343 implementation of the make program or an earlier version of GNU make.
2344
8ba42bc5
EZ
2345* Native debugging on MS-Windows supports command-line redirection
2346
2347 Command-line arguments used for starting programs on MS-Windows can
2348 now include redirection symbols supported by native Windows shells,
2349 such as '<', '>', '>>', '2>&1', etc. This affects GDB commands such
2350 as "run", "start", and "set args", as well as the corresponding MI
2351 features.
2352
24cdb46e
РИ
2353* Support for thread names on MS-Windows.
2354
2355 GDB now catches and handles the special exception that programs
2356 running on MS-Windows use to assign names to threads in the
2357 debugger.
2358
9c37b5ae
TT
2359* Support for Java programs compiled with gcj has been removed.
2360
df3ee9ca
PA
2361* User commands now accept an unlimited number of arguments.
2362 Previously, only up to 10 was accepted.
2363
01770bbd
PA
2364* The "eval" command now expands user-defined command arguments.
2365
2366 This makes it easier to process a variable number of arguments:
2367
2368 define mycommand
2369 set $i = 0
2370 while $i < $argc
2371 eval "print $arg%d", $i
2372 set $i = $i + 1
2373 end
2374 end
2375
3f7b46f2
IR
2376* Target descriptions can now describe registers for sparc32 and sparc64.
2377
0ae60b63
JK
2378* GDB now supports DWARF version 5 (debug information format).
2379 Its .debug_names index is not yet supported.
2380
b268007c
JB
2381* New native configurations
2382
2383FreeBSD/mips mips*-*-freebsd
2384
ad0a504f
AK
2385* New targets
2386
2387Synopsys ARC arc*-*-elf32
387360da 2388FreeBSD/mips mips*-*-freebsd
ad0a504f 2389
db6be0d5
SM
2390* Removed targets and native configurations
2391
2392Alpha running FreeBSD alpha*-*-freebsd*
2393Alpha running GNU/kFreeBSD alpha*-*-kfreebsd*-gnu
2394
78cbbba8
LM
2395* New commands
2396
2397flash-erase
2398 Erases all the flash memory regions reported by the target.
2399
db6be0d5
SM
2400maint print arc arc-instruction address
2401 Print internal disassembler information about instruction at a given address.
51457a05 2402
db6be0d5 2403* New options
65b48a81
PB
2404
2405set disassembler-options
2406show disassembler-options
2407 Controls the passing of target specific information to the disassembler.
2408 If it is necessary to specify more than one disassembler option then
2409 multiple options can be placed together into a comma separated list.
2410 The default value is the empty string. Currently, the only supported
2411 targets are ARM, PowerPC and S/390.
2412
db6be0d5 2413* New MI commands
eea78757 2414
db6be0d5
SM
2415-target-flash-erase
2416 Erases all the flash memory regions reported by the target. This is
2417 equivalent to the CLI command flash-erase.
1e1a8bef 2418
db6be0d5
SM
2419-file-list-shared-libraries
2420 List the shared libraries in the program. This is
2421 equivalent to the CLI command "info shared".
1e1a8bef 2422
bea298f9
XR
2423-catch-handlers
2424 Catchpoints stopping the program when Ada exceptions are
2425 handled. This is equivalent to the CLI command "catch handlers".
2426
751b375e 2427*** Changes in GDB 7.12
1233c0ba 2428
69ffd7f2
PA
2429* GDB and GDBserver now build with a C++ compiler by default.
2430
2431 The --enable-build-with-cxx configure option is now enabled by
2432 default. One must now explicitly configure with
2433 --disable-build-with-cxx in order to build with a C compiler. This
2434 option will be removed in a future release.
2435
c0272db5
TW
2436* GDBserver now supports recording btrace without maintaining an active
2437 GDB connection.
2438
bb556f1f
TK
2439* GDB now supports a negative repeat count in the 'x' command to examine
2440 memory backward from the given address. For example:
2441
2442 (gdb) bt
2443 #0 Func1 (n=42, p=0x40061c "hogehoge") at main.cpp:4
2444 #1 0x400580 in main (argc=1, argv=0x7fffffffe5c8) at main.cpp:8
2445 (gdb) x/-5i 0x0000000000400580
2446 0x40056a <main(int, char**)+8>: mov %edi,-0x4(%rbp)
2447 0x40056d <main(int, char**)+11>: mov %rsi,-0x10(%rbp)
2448 0x400571 <main(int, char**)+15>: mov $0x40061c,%esi
2449 0x400576 <main(int, char**)+20>: mov $0x2a,%edi
2450 0x40057b <main(int, char**)+25>:
2451 callq 0x400536 <Func1(int, char const*)>
2452
9920b434
BH
2453* Fortran: Support structures with fields of dynamic types and
2454 arrays of dynamic types.
2455
34c41c68
DE
2456* The symbol dumping maintenance commands have new syntax.
2457maint print symbols [-pc address] [--] [filename]
2458maint print symbols [-objfile objfile] [-source source] [--] [filename]
2459maint print psymbols [-objfile objfile] [-pc address] [--] [filename]
2460maint print psymbols [-objfile objfile] [-source source] [--] [filename]
2461maint print msymbols [-objfile objfile] [--] [filename]
2462
81516450
DE
2463* GDB now supports multibit bitfields and enums in target register
2464 descriptions.
2465
f2f3ccb9
SM
2466* New Python-based convenience function $_as_string(val), which returns
2467 the textual representation of a value. This function is especially
2468 useful to obtain the text label of an enum value.
2469
012b3a21
WT
2470* Intel MPX bound violation handling.
2471
2472 Segmentation faults caused by a Intel MPX boundary violation
2473 now display the kind of violation (upper or lower), the memory
2474 address accessed and the memory bounds, along with the usual
2475 signal received and code location.
2476
2477 For example:
2478
2479 Program received signal SIGSEGV, Segmentation fault
2480 Upper bound violation while accessing address 0x7fffffffc3b3
2481 Bounds: [lower = 0x7fffffffc390, upper = 0x7fffffffc3a3]
2482 0x0000000000400d7c in upper () at i386-mpx-sigsegv.c:68
2483
0bdfa368
TT
2484* Rust language support.
2485 GDB now supports debugging programs written in the Rust programming
2486 language. See https://www.rust-lang.org/ for more information about
2487 Rust.
2488
86f78169
PA
2489* Support for running interpreters on specified input/output devices
2490
2491 GDB now supports a new mechanism that allows frontends to provide
2492 fully featured GDB console views, as a better alternative to
2493 building such views on top of the "-interpreter-exec console"
2494 command. See the new "new-ui" command below. With that command,
2495 frontends can now start GDB in the traditional command-line mode
2496 running in an embedded terminal emulator widget, and create a
2497 separate MI interpreter running on a specified i/o device. In this
2498 way, GDB handles line editing, history, tab completion, etc. in the
2499 console all by itself, and the GUI uses the separate MI interpreter
2500 for its own control and synchronization, invisible to the command
2501 line.
2502
e3487908
GKB
2503* The "catch syscall" command catches groups of related syscalls.
2504
2505 The "catch syscall" command now supports catching a group of related
2506 syscalls using the 'group:' or 'g:' prefix.
2507
d2dffb8d
DE
2508* New commands
2509
2510skip -file file
2511skip -gfile file-glob-pattern
2512skip -function function
2513skip -rfunction regular-expression
2514 A generalized form of the skip command, with new support for
2515 glob-style file names and regular expressions for function names.
2516 Additionally, a file spec and a function spec may now be combined.
2517
f2403c39 2518maint info line-table REGEXP
82f06518 2519 Display the contents of GDB's internal line table data structure.
f2403c39 2520
dcd1f979
TT
2521maint selftest
2522 Run any GDB unit tests that were compiled in.
2523
86f78169
PA
2524new-ui INTERP TTY
2525 Start a new user interface instance running INTERP as interpreter,
2526 using the TTY file for input/output.
2527
93daf339
TT
2528* Python Scripting
2529
2530 ** gdb.Breakpoint objects have a new attribute "pending", which
2531 indicates whether the breakpoint is pending.
8d2a0a14
TT
2532 ** Three new breakpoint-related events have been added:
2533 gdb.breakpoint_created, gdb.breakpoint_modified, and
2534 gdb.breakpoint_deleted.
93daf339 2535
463888ab
РИ
2536signal-event EVENTID
2537 Signal ("set") the given MS-Windows event object. This is used in
2538 conjunction with the Windows JIT debugging (AeDebug) support, where
2539 the OS suspends a crashing process until a debugger can attach to
2540 it. Resuming the crashing process, in order to debug it, is done by
2541 signalling an event.
2542
c37c0ba6
MK
2543* Support for tracepoints and fast tracepoints on s390-linux and s390x-linux
2544 was added in GDBserver, including JIT compiling fast tracepoint's
2545 conditional expression bytecode into native code.
2546
f7c38292
PA
2547* Support for various remote target protocols and ROM monitors has
2548 been removed:
2549
2550 target m32rsdi Remote M32R debugging over SDI
2551 target mips MIPS remote debugging protocol
2552 target pmon PMON ROM monitor
2553 target ddb NEC's DDB variant of PMON for Vr4300
2554 target rockhopper NEC RockHopper variant of PMON
2555 target lsi LSI variant of PMO
2556
22084c42
MK
2557* Support for tracepoints and fast tracepoints on powerpc-linux,
2558 powerpc64-linux, and powerpc64le-linux was added in GDBserver,
2559 including JIT compiling fast tracepoint's conditional expression
2560 bytecode into native code.
2561
38b022b4
SM
2562* MI async record =record-started now includes the method and format used for
2563 recording. For example:
2564
2565 =record-started,thread-group="i1",method="btrace",format="bts"
2566
4034d0ff
AT
2567* MI async record =thread-selected now includes the frame field. For example:
2568
2569 =thread-selected,id="3",frame={level="0",addr="0x00000000004007c0"}
2570
a28d8e50
YTL
2571* New targets
2572
2573Andes NDS32 nds32*-*-elf
2574
1233c0ba 2575*** Changes in GDB 7.11
7c79d316 2576
6e9567fe
JB
2577* GDB now supports debugging kernel-based threads on FreeBSD.
2578
5d5658a1
PA
2579* Per-inferior thread numbers
2580
2581 Thread numbers are now per inferior instead of global. If you're
2582 debugging multiple inferiors, GDB displays thread IDs using a
2583 qualified INF_NUM.THR_NUM form. For example:
2584
2585 (gdb) info threads
2586 Id Target Id Frame
2587 1.1 Thread 0x7ffff7fc2740 (LWP 8155) (running)
2588 1.2 Thread 0x7ffff7fc1700 (LWP 8168) (running)
2589 * 2.1 Thread 0x7ffff7fc2740 (LWP 8157) (running)
2590 2.2 Thread 0x7ffff7fc1700 (LWP 8190) (running)
2591
2592 As consequence, thread numbers as visible in the $_thread
2593 convenience variable and in Python's InferiorThread.num attribute
2594 are no longer unique between inferiors.
2595
2596 GDB now maintains a second thread ID per thread, referred to as the
2597 global thread ID, which is the new equivalent of thread numbers in
663f6d42 2598 previous releases. See also $_gthread below.
5d5658a1
PA
2599
2600 For backwards compatibility, MI's thread IDs always refer to global
2601 IDs.
2602
2603* Commands that accept thread IDs now accept the qualified
2604 INF_NUM.THR_NUM form as well. For example:
2605
2606 (gdb) thread 2.1
2607 [Switching to thread 2.1 (Thread 0x7ffff7fc2740 (LWP 8157))] (running)
2608 (gdb)
2609
71ef29a8
PA
2610* In commands that accept a list of thread IDs, you can now refer to
2611 all threads of an inferior using a star wildcard. GDB accepts
2612 "INF_NUM.*", to refer to all threads of inferior INF_NUM, and "*" to
2613 refer to all threads of the current inferior. For example, "info
2614 threads 2.*".
2615
c84f6bbf
PA
2616* You can use "info threads -gid" to display the global thread ID of
2617 all threads.
2618
663f6d42
PA
2619* The new convenience variable $_gthread holds the global number of
2620 the current thread.
2621
e3940304
PA
2622* The new convenience variable $_inferior holds the number of the
2623 current inferior.
2624
f303dbd6
PA
2625* GDB now displays the ID and name of the thread that hit a breakpoint
2626 or received a signal, if your program is multi-threaded. For
2627 example:
2628
2629 Thread 3 "bar" hit Breakpoint 1 at 0x40087a: file program.c, line 20.
2630 Thread 1 "main" received signal SIGINT, Interrupt.
2631
cbb55fa7
MM
2632* Record btrace now supports non-stop mode.
2633
58d2eda5
PL
2634* Support for tracepoints on aarch64-linux was added in GDBserver.
2635
da8c46d2 2636* The 'record instruction-history' command now indicates speculative execution
bc504a31 2637 when using the Intel Processor Trace recording format.
da8c46d2 2638
629500fa
KS
2639* GDB now allows users to specify explicit locations, bypassing
2640 the linespec parser. This feature is also available to GDB/MI
2641 clients.
2642
02f024f9
YQ
2643* Multi-architecture debugging is supported on AArch64 GNU/Linux.
2644 GDB now is able to debug both AArch64 applications and ARM applications
2645 at the same time.
2646
4d9d419e
PL
2647* Support for fast tracepoints on aarch64-linux was added in GDBserver,
2648 including JIT compiling fast tracepoint's conditional expression bytecode
2649 into native code.
2650
eda14cf2
YQ
2651* GDB now supports displaced stepping on AArch64 GNU/Linux.
2652
be81798b
PA
2653* "info threads", "info inferiors", "info display", "info checkpoints"
2654 and "maint info program-spaces" now list the corresponding items in
2655 ascending ID order, for consistency with all other "info" commands.
2656
3685b09f
PMR
2657* In Ada, the overloads selection menu has been enhanced to display the
2658 parameter types and the return types for the matching overloaded subprograms.
2659
fbea99ea
PA
2660* New commands
2661
2662maint set target-non-stop (on|off|auto)
2663maint show target-non-stop
2664 Control whether GDB targets always operate in non-stop mode even if
2665 "set non-stop" is "off". The default is "auto", meaning non-stop
2666 mode is enabled if supported by the target.
2667
18989b3c
AB
2668maint set bfd-sharing
2669maint show bfd-sharing
2670 Control the reuse of bfd objects.
2671
566f5e3b
AB
2672set debug bfd-cache
2673show debug bfd-cache
2674 Control display of debugging info regarding bfd caching.
2675
6e9567fe
JB
2676set debug fbsd-lwp
2677show debug fbsd-lwp
2678 Control display of debugging info regarding FreeBSD threads.
2679
73b8c1fd
PA
2680set remote multiprocess-extensions-packet
2681show remote multiprocess-extensions-packet
2682 Set/show the use of the remote protocol multiprocess extensions.
2683
65706a29
PA
2684set remote thread-events
2685show remote thread-events
2686 Set/show the use of thread create/exit events.
2687
3685b09f
PMR
2688set ada print-signatures on|off
2689show ada print-signatures"
2690 Control whether parameter types and return types are displayed in overloads
82f06518 2691 selection menus. It is activated (@code{on}) by default.
3685b09f 2692
5fdf6324
AB
2693set max-value-size
2694show max-value-size
2695 Controls the maximum size of memory, in bytes, that GDB will
2696 allocate for value contents. Prevents incorrect programs from
2697 causing GDB to allocate overly large buffers. Default is 64k.
2698
6ff0ba5f
DE
2699* The "disassemble" command accepts a new modifier: /s.
2700 It prints mixed source+disassembly like /m with two differences:
2701 - disassembled instructions are now printed in program order, and
2702 - and source for all relevant files is now printed.
2703 The "/m" option is now considered deprecated: its "source-centric"
2704 output hasn't proved useful in practice.
2705
0c532a29
MM
2706* The "record instruction-history" command accepts a new modifier: /s.
2707 It behaves exactly like /m and prints mixed source+disassembly.
2708
f2665db5
MM
2709* The "set scheduler-locking" command supports a new mode "replay".
2710 It behaves like "off" in record mode and like "on" in replay mode.
2711
40e0b271
PA
2712* Support for various ROM monitors has been removed:
2713
2714 target dbug dBUG ROM monitor for Motorola ColdFire
2715 target picobug Motorola picobug monitor
2716 target dink32 DINK32 ROM monitor for PowerPC
2717 target m32r Renesas M32R/D ROM monitor
2718 target mon2000 mon2000 ROM monitor
2719 target ppcbug PPCBUG ROM monitor for PowerPC
2720
fd2ae5d6 2721* Support for reading/writing memory and extracting values on architectures
d63dd61e 2722 whose memory is addressable in units of any integral multiple of 8 bits.
fd2ae5d6 2723
9f757bf7
XR
2724catch handlers
2725 Allows to break when an Ada exception is handled.
2726
b459a59b
DB
2727* New remote packets
2728
2729exec stop reason
2730 Indicates that an exec system call was executed.
2731
2732exec-events feature in qSupported
2733 The qSupported packet allows GDB to request support for exec
2734 events using the new 'gdbfeature' exec-event, and the qSupported
2735 response can contain the corresponding 'stubfeature'. Set and
2736 show commands can be used to display whether these features are enabled.
2737
de979965
PA
2738vCtrlC
2739 Equivalent to interrupting with the ^C character, but works in
2740 non-stop mode.
2741
65706a29
PA
2742thread created stop reason (T05 create:...)
2743 Indicates that the thread was just created and is stopped at entry.
2744
2745thread exit stop reply (w exitcode;tid)
2746 Indicates that the thread has terminated.
2747
2748QThreadEvents
2749 Enables/disables thread create and exit event reporting. For
2750 example, this is used in non-stop mode when GDB stops a set of
2751 threads and synchronously waits for the their corresponding stop
2752 replies. Without exit events, if one of the threads exits, GDB
2753 would hang forever not knowing that it should no longer expect a
2754 stop for that same thread.
2755
f2faf941 2756N stop reply
f2faf941
PA
2757 Indicates that there are no resumed threads left in the target (all
2758 threads are stopped). The remote stub reports support for this stop
2759 reply to GDB's qSupported query.
2760
aab3c527
JK
2761QCatchSyscalls
2762 Enables/disables catching syscalls from the inferior process.
2763 The remote stub reports support for this packet to GDB's qSupported query.
82075af2
JS
2764
2765syscall_entry stop reason
2766 Indicates that a syscall was just called.
2767
2768syscall_return stop reason
2769 Indicates that a syscall just returned.
2770
b459a59b
DB
2771* Extended-remote exec events
2772
2773 ** GDB now has support for exec events on extended-remote Linux targets.
2774 For such targets with Linux kernels 2.5.46 and later, this enables
2775 follow-exec-mode and exec catchpoints.
2776
2777set remote exec-event-feature-packet
2778show remote exec-event-feature-packet
2779 Set/show the use of the remote exec event feature.
2780
79efa585
SM
2781 * Thread names in remote protocol
2782
2783 The reply to qXfer:threads:read may now include a name attribute for each
2784 thread.
2785
19d9d4ef
DB
2786* Target remote mode fork and exec events
2787
2788 ** GDB now has support for fork and exec events on target remote mode
2789 Linux targets. For such targets with Linux kernels 2.5.46 and later,
2790 this enables follow-fork-mode, detach-on-fork, follow-exec-mode, and
2791 fork and exec catchpoints.
2792
82075af2
JS
2793* Remote syscall events
2794
2795 ** GDB now has support for catch syscall on remote Linux targets,
2796 currently enabled on x86/x86_64 architectures.
2797
2798set remote catch-syscall-packet
2799show remote catch-syscall-packet
2800 Set/show the use of the remote catch syscall feature.
2801
1c35a88f
LM
2802* MI changes
2803
2804 ** The -var-set-format command now accepts the zero-hexadecimal
2805 format. It outputs data in hexadecimal format with zero-padding on the
2806 left.
2807
84654457
PA
2808* Python Scripting
2809
22a02324
PA
2810 ** gdb.InferiorThread objects have a new attribute "global_num",
2811 which refers to the thread's global thread ID. The existing
2812 "num" attribute now refers to the thread's per-inferior number.
2813 See "Per-inferior thread numbers" above.
84654457
PA
2814 ** gdb.InferiorThread objects have a new attribute "inferior", which
2815 is the Inferior object the thread belongs to.
2816
7c79d316 2817*** Changes in GDB 7.10
df8411da 2818
c16a3f52
OJ
2819* Support for process record-replay and reverse debugging on aarch64*-linux*
2820 targets has been added. GDB now supports recording of A64 instruction set
2821 including advance SIMD instructions.
2822
18a94d75
DE
2823* Support for Sun's version of the "stabs" debug file format has been removed.
2824
df8411da
SDJ
2825* GDB now honors the content of the file /proc/PID/coredump_filter
2826 (PID is the process ID) on GNU/Linux systems. This file can be used
2827 to specify the types of memory mappings that will be included in a
2828 corefile. For more information, please refer to the manual page of
2829 "core(5)". GDB also has a new command: "set use-coredump-filter
2830 on|off". It allows to set whether GDB will read the content of the
2831 /proc/PID/coredump_filter file when generating a corefile.
3b2f13ff 2832
d33279b3
AT
2833* The "info os" command on GNU/Linux can now display information on
2834 cpu information :
2835 "info os cpus" Listing of all cpus/cores on the system
2836
236af5e3
YG
2837* GDB has two new commands: "set serial parity odd|even|none" and
2838 "show serial parity". These allows to set or show parity for the
2839 remote serial I/O.
2840
b6577aab
DE
2841* The "info source" command now displays the producer string if it was
2842 present in the debug info. This typically includes the compiler version
2843 and may include things like its command line arguments.
2844
b30a0bc3
JB
2845* The "info dll", an alias of the "info sharedlibrary" command,
2846 is now available on all platforms.
2847
599bd15c
GB
2848* Directory names supplied to the "set sysroot" commands may be
2849 prefixed with "target:" to tell GDB to access shared libraries from
2850 the target system, be it local or remote. This replaces the prefix
2851 "remote:". The default sysroot has been changed from "" to
2852 "target:". "remote:" is automatically converted to "target:" for
2853 backward compatibility.
2854
a9a5a3d1
GB
2855* The system root specified by "set sysroot" will be prepended to the
2856 filename of the main executable (if reported to GDB as absolute by
2857 the operating system) when starting processes remotely, and when
2858 attaching to already-running local or remote processes.
2859
1b6e6f5c
GB
2860* GDB now supports automatic location and retrieval of executable
2861 files from remote targets. Remote debugging can now be initiated
2862 using only a "target remote" or "target extended-remote" command
2863 (no "set sysroot" or "file" commands are required). See "New remote
2864 packets" below.
2865
cf75d6c3
AB
2866* The "dump" command now supports verilog hex format.
2867
417c80f9
AA
2868* GDB now supports the vector ABI on S/390 GNU/Linux targets.
2869
51aad7cc
GB
2870* On GNU/Linux, GDB and gdbserver are now able to access executable
2871 and shared library files without a "set sysroot" command when
2872 attaching to processes running in different mount namespaces from
2873 the debugger. This makes it possible to attach to processes in
2874 containers as simply as "gdb -p PID" or "gdbserver --attach PID".
2875 See "New remote packets" below.
2876
51f0e40d
AB
2877* The "tui reg" command now provides completion for all of the
2878 available register groups, including target specific groups.
2879
b58c513b
PP
2880* The HISTSIZE environment variable is no longer read when determining
2881 the size of GDB's command history. GDB now instead reads the dedicated
bc460514
PP
2882 GDBHISTSIZE environment variable. Setting GDBHISTSIZE to "-1" or to "" now
2883 disables truncation of command history. Non-numeric values of GDBHISTSIZE
2884 are ignored.
b58c513b 2885
37442ce1
DE
2886* Guile Scripting
2887
2888 ** Memory ports can now be unbuffered.
2889
3a8b707a
DE
2890* Python Scripting
2891
2892 ** gdb.Objfile objects have a new attribute "username",
2893 which is the name of the objfile as specified by the user,
2894 without, for example, resolving symlinks.
d11916aa 2895 ** You can now write frame unwinders in Python.
59fb7612
SS
2896 ** gdb.Type objects have a new method "optimized_out",
2897 returning optimized out gdb.Value instance of this type.
4c082a81
SC
2898 ** gdb.Value objects have new methods "reference_value" and
2899 "const_value" which return a reference to the value and a
2900 "const" version of the value respectively.
3a8b707a 2901
f57d2163
DE
2902* New commands
2903
2904maint print symbol-cache
2905 Print the contents of the symbol cache.
2906
2907maint print symbol-cache-statistics
2908 Print statistics of symbol cache usage.
2909
2910maint flush-symbol-cache
2911 Flush the contents of the symbol cache.
2912
f4abbc16
MM
2913record btrace bts
2914record bts
2915 Start branch trace recording using Branch Trace Store (BTS) format.
2916
36de76f9
JK
2917compile print
2918 Evaluate expression by using the compiler and print result.
2919
a4ea0946
AB
2920tui enable
2921tui disable
2922 Explicit commands for enabling and disabling tui mode.
2923
29c1c244
WT
2924show mpx bound
2925set mpx bound on i386 and amd64
bc504a31 2926 Support for bound table investigation on Intel MPX enabled applications.
29c1c244 2927
b20a6524
MM
2928record btrace pt
2929record pt
bc504a31 2930 Start branch trace recording using Intel Processor Trace format.
b20a6524 2931
b0627500
MM
2932maint info btrace
2933 Print information about branch tracing internals.
2934
2935maint btrace packet-history
2936 Print the raw branch tracing data.
2937
2938maint btrace clear-packet-history
2939 Discard the stored raw branch tracing data.
2940
2941maint btrace clear
2942 Discard all branch tracing data. It will be fetched and processed
2943 anew by the next "record" command.
2944
253828f1
JK
2945* New options
2946
b4f54984
DE
2947set debug dwarf-die
2948 Renamed from "set debug dwarf2-die".
2949show debug dwarf-die
2950 Renamed from "show debug dwarf2-die".
2951
2952set debug dwarf-read
2953 Renamed from "set debug dwarf2-read".
2954show debug dwarf-read
2955 Renamed from "show debug dwarf2-read".
2956
2957maint set dwarf always-disassemble
2958 Renamed from "maint set dwarf2 always-disassemble".
2959maint show dwarf always-disassemble
2960 Renamed from "maint show dwarf2 always-disassemble".
2961
2962maint set dwarf max-cache-age
2963 Renamed from "maint set dwarf2 max-cache-age".
2964maint show dwarf max-cache-age
2965 Renamed from "maint show dwarf2 max-cache-age".
2966
27e0867f
DE
2967set debug dwarf-line
2968show debug dwarf-line
2969 Control display of debugging info regarding DWARF line processing.
2970
ef0b411a
GB
2971set max-completions
2972show max-completions
2973 Set the maximum number of candidates to be considered during
2974 completion. The default value is 200. This limit allows GDB
2975 to avoid generating large completion lists, the computation of
2976 which can cause the debugger to become temporarily unresponsive.
2977
fc637f04
PP
2978set history remove-duplicates
2979show history remove-duplicates
2980 Control the removal of duplicate history entries.
2981
f57d2163
DE
2982maint set symbol-cache-size
2983maint show symbol-cache-size
2984 Control the size of the symbol cache.
2985
d33501a5
MM
2986set|show record btrace bts buffer-size
2987 Set and show the size of the ring buffer used for branch tracing in
2988 BTS format.
2989 The obtained size may differ from the requested size. Use "info
2990 record" to see the obtained buffer size.
2991
7a6a1731
GB
2992set debug linux-namespaces
2993show debug linux-namespaces
2994 Control display of debugging info regarding Linux namespaces.
2995
b20a6524
MM
2996set|show record btrace pt buffer-size
2997 Set and show the size of the ring buffer used for branch tracing in
bc504a31 2998 Intel Processor Trace format.
b20a6524
MM
2999 The obtained size may differ from the requested size. Use "info
3000 record" to see the obtained buffer size.
3001
b0627500
MM
3002maint set|show btrace pt skip-pad
3003 Set and show whether PAD packets are skipped when computing the
3004 packet history.
3005
253828f1
JK
3006* The command 'thread apply all' can now support new option '-ascending'
3007 to call its specified command for all threads in ascending order.
3008
9f050062
DE
3009* Python/Guile scripting
3010
3011 ** GDB now supports auto-loading of Python/Guile scripts contained in the
3012 special section named `.debug_gdb_scripts'.
3013
f4abbc16
MM
3014* New remote packets
3015
3016qXfer:btrace-conf:read
3017 Return the branch trace configuration for the current thread.
3018
d33501a5
MM
3019Qbtrace-conf:bts:size
3020 Set the requested ring buffer size for branch tracing in BTS format.
3021
b20a6524 3022Qbtrace:pt
82f06518 3023 Enable Intel Processor Trace-based branch tracing for the current
b20a6524
MM
3024 process. The remote stub reports support for this packet to GDB's
3025 qSupported query.
3026
3027Qbtrace-conf:pt:size
bc504a31 3028 Set the requested ring buffer size for branch tracing in Intel Processor
b20a6524
MM
3029 Trace format.
3030
f7e6eed5
PA
3031swbreak stop reason
3032 Indicates a memory breakpoint instruction was executed, irrespective
3033 of whether it was GDB that planted the breakpoint or the breakpoint
3034 is hardcoded in the program. This is required for correct non-stop
3035 mode operation.
3036
3037hwbreak stop reason
3038 Indicates the target stopped for a hardware breakpoint. This is
3039 required for correct non-stop mode operation.
3040
0a93529c
GB
3041vFile:fstat:
3042 Return information about files on the remote system.
3043
c78fa86a
GB
3044qXfer:exec-file:read
3045 Return the full absolute name of the file that was executed to
3046 create a process running on the remote system.
3047
15a201c8
GB
3048vFile:setfs:
3049 Select the filesystem on which vFile: operations with filename
3050 arguments will operate. This is required for GDB to be able to
3051 access files on remote targets where the remote stub does not
3052 share a common filesystem with the inferior(s).
3053
0d71eef5
DB
3054fork stop reason
3055 Indicates that a fork system call was executed.
3056
3057vfork stop reason
3058 Indicates that a vfork system call was executed.
3059
3060vforkdone stop reason
3061 Indicates that a vfork child of the specified process has executed
3062 an exec or exit, allowing the vfork parent to resume execution.
3063
3064fork-events and vfork-events features in qSupported
3065 The qSupported packet allows GDB to request support for fork and
3066 vfork events using new 'gdbfeatures' fork-events and vfork-events,
3067 and the qSupported response can contain the corresponding
3068 'stubfeatures'. Set and show commands can be used to display
3069 whether these features are enabled.
3070
3071* Extended-remote fork events
3072
3073 ** GDB now has support for fork events on extended-remote Linux
3074 targets. For targets with Linux kernels 2.5.60 and later, this
3075 enables follow-fork-mode and detach-on-fork for both fork and
3076 vfork, as well as fork and vfork catchpoints.
3077
d33501a5
MM
3078* The info record command now shows the recording format and the
3079 branch tracing configuration for the current thread when using
3080 the btrace record target.
3081 For the BTS format, it shows the ring buffer size.
3082
b05e3b0d
JM
3083* GDB now has support for DTrace USDT (Userland Static Defined
3084 Tracing) probes. The supported targets are x86_64-*-linux-gnu.
3085
550bdf96
AA
3086* GDB now supports access to vector registers on S/390 GNU/Linux
3087 targets.
3088
4f45d445
JK
3089* Removed command line options
3090
3091-xdb HP-UX XDB compatibility mode.
3092
0800b440
JK
3093* Removed targets and native configurations
3094
3095HP/PA running HP-UX hppa*-*-hpux*
3096Itanium running HP-UX ia64-*-hpux*
3097
58bfce93
MM
3098* New configure options
3099
3100--with-intel-pt
3101 This configure option allows the user to build GDB with support for
bc504a31 3102 Intel Processor Trace (default: auto). This requires libipt.
58bfce93
MM
3103
3104--with-libipt-prefix=PATH
3105 Specify the path to the version of libipt that GDB should use.
3106 $PATH/include should contain the intel-pt.h header and
3107 $PATH/lib should contain the libipt.so library.
3108
f5f85ab9
JB
3109*** Changes in GDB 7.9.1
3110
3111* Python Scripting
3112
3113 ** Xmethods can now specify a result type.
3114
3b2f13ff 3115*** Changes in GDB 7.9
919b9a93 3116
05db5edd
ST
3117* GDB now supports hardware watchpoints on x86 GNU Hurd.
3118
5f3b99cf 3119* Python Scripting
2b4fd423
DE
3120
3121 ** You can now access frame registers from Python scripts.
3122 ** New attribute 'producer' for gdb.Symtab objects.
d096d8c1
DE
3123 ** gdb.Objfile objects have a new attribute "progspace",
3124 which is the gdb.Progspace object of the containing program space.
a0be3e44 3125 ** gdb.Objfile objects have a new attribute "owner".
7c50a931
DE
3126 ** gdb.Objfile objects have a new attribute "build_id",
3127 which is the build ID generated when the file was built.
86e4ed39 3128 ** gdb.Objfile objects have a new method "add_separate_debug_file".
4ffbba72
DE
3129 ** A new event "gdb.clear_objfiles" has been added, triggered when
3130 selecting a new file to debug.
02be9a71 3131 ** You can now add attributes to gdb.Objfile and gdb.Progspace objects.
6dddd6a5 3132 ** New function gdb.lookup_objfile.
5f3b99cf 3133
8fda9068
YQ
3134 New events which are triggered when GDB modifies the state of the
3135 inferior.
3136
3137 ** gdb.events.inferior_call_pre: Function call is about to be made.
3138 ** gdb.events.inferior_call_post: Function call has just been made.
3139 ** gdb.events.memory_changed: A memory location has been altered.
3140 ** gdb.events.register_changed: A register has been altered.
3141
faa42425
DE
3142* New Python-based convenience functions:
3143
3144 ** $_caller_is(name [, number_of_frames])
3145 ** $_caller_matches(regexp [, number_of_frames])
3146 ** $_any_caller_is(name [, number_of_frames])
3147 ** $_any_caller_matches(regexp [, number_of_frames])
3148
bb2ec1b3
TT
3149* GDB now supports the compilation and injection of source code into
3150 the inferior. GDB will use GCC 5.0 or higher built with libcc1.so
3151 to compile the source code to object code, and if successful, inject
3152 and execute that code within the current context of the inferior.
3153 Currently the C language is supported. The commands used to
3154 interface with this new feature are:
3155
3156 compile code [-raw|-r] [--] [source code]
3157 compile file [-raw|-r] filename
3158
81219e53
DE
3159* New commands
3160
439250fb
DE
3161demangle [-l language] [--] name
3162 Demangle "name" in the specified language, or the current language
3163 if elided. This command is renamed from the "maint demangle" command.
3164 The latter is kept as a no-op to avoid "maint demangle" being interpreted
3165 as "maint demangler-warning".
3166
81219e53
DE
3167queue-signal signal-name-or-number
3168 Queue a signal to be delivered to the thread when it is resumed.
3169
f10c5b19
JK
3170add-auto-load-scripts-directory directory
3171 Add entries to the list of directories from which to load auto-loaded
3172 scripts.
3173
f5b95c01
AA
3174maint print user-registers
3175 List all currently available "user" registers.
3176
bb2ec1b3
TT
3177compile code [-r|-raw] [--] [source code]
3178 Compile, inject, and execute in the inferior the executable object
3179 code produced by compiling the provided source code.
3180
3181compile file [-r|-raw] filename
3182 Compile and inject into the inferior the executable object code
3183 produced by compiling the source code stored in the filename
3184 provided.
3185
70509625
PA
3186* On resume, GDB now always passes the signal the program had stopped
3187 for to the thread the signal was sent to, even if the user changed
3188 threads before resuming. Previously GDB would often (but not
3189 always) deliver the signal to the thread that happens to be current
3190 at resume time.
3191
3192* Conversely, the "signal" command now consistently delivers the
3193 requested signal to the current thread. GDB now asks for
3194 confirmation if the program had stopped for a signal and the user
3195 switched threads meanwhile.
3196
a25a5a45
PA
3197* "breakpoint always-inserted" modes "off" and "auto" merged.
3198
3199 Now, when 'breakpoint always-inserted mode' is set to "off", GDB
3200 won't remove breakpoints from the target until all threads stop,
3201 even in non-stop mode. The "auto" mode has been removed, and "off"
3202 is now the default mode.
3203
cc485e62
DE
3204* New options
3205
3206set debug symbol-lookup
3207show debug symbol-lookup
3208 Control display of debugging info regarding symbol lookup.
3209
2ddf4301
SM
3210* MI changes
3211
3212 ** The -list-thread-groups command outputs an exit-code field for
3213 inferiors that have exited.
3214
bb7e3f4d
YQ
3215* New targets
3216
3217MIPS SDE mips*-sde*-elf*
3218
3831839c
PA
3219* Removed targets
3220
3221Support for these obsolete configurations has been removed.
3222
5ab806de
PA
3223Alpha running OSF/1 (or Tru64) alpha*-*-osf*
3224SGI Irix-5.x mips-*-irix5*
3225SGI Irix-6.x mips-*-irix6*
09dd9a69
PA
3226VAX running (4.2 - 4.3 Reno) BSD vax-*-bsd*
3227VAX running Ultrix vax-*-ultrix*
3831839c 3228
6bf6fd09
JB
3229* The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
3230 and "assf"), have been removed. Use the "sharedlibrary" command, or
3231 its alias "share", instead.
3232
919b9a93 3233*** Changes in GDB 7.8
e9475ead 3234
8d551b02
DE
3235* New command line options
3236
3237-D data-directory
3238 This is an alias for the --data-directory option.
3239
e9475ead
SA
3240* GDB supports printing and modifying of variable length automatic arrays
3241 as specified in ISO C99.
3242
a75fef0e
NC
3243* The ARM simulator now supports instruction level tracing
3244 with or without disassembly.
b7bba001 3245
ed3ef339
DE
3246* Guile scripting
3247
3248 GDB now has support for scripting using Guile. Whether this is
3249 available is determined at configure time.
3250 Guile version 2.0 or greater is required.
3251 Guile version 2.0.9 is well tested, earlier 2.0 versions are not.
3252
3253* New commands (for set/show, see "New options" below)
3254
3255guile [code]
3256gu [code]
3257 Invoke CODE by passing it to the Guile interpreter.
3258
3259guile-repl
3260gr
3261 Start a Guile interactive prompt (or "repl" for "read-eval-print loop").
3262
3263info auto-load guile-scripts [regexp]
3264 Print the list of automatically loaded Guile scripts.
3265
3266* The source command is now capable of sourcing Guile scripts.
3267 This feature is dependent on the debugger being built with Guile support.
3268
c6044dd1
JB
3269* New options
3270
770e7fc7
DE
3271set print symbol-loading (off|brief|full)
3272show print symbol-loading
3273 Control whether to print informational messages when loading symbol
3274 information for a file. The default is "full", but when debugging
3275 programs with large numbers of shared libraries the amount of output
3276 becomes less useful.
3277
ed3ef339
DE
3278set guile print-stack (none|message|full)
3279show guile print-stack
3280 Show a stack trace when an error is encountered in a Guile script.
3281
3282set auto-load guile-scripts (on|off)
3283show auto-load guile-scripts
3284 Control auto-loading of Guile script files.
3285
c6044dd1
JB
3286maint ada set ignore-descriptive-types (on|off)
3287maint ada show ignore-descriptive-types
3288 Control whether the debugger should ignore descriptive types in Ada
3289 programs. The default is not to ignore the descriptive types. See
3290 the user manual for more details on descriptive types and the intended
3291 usage of this option.
3292
6a3cb8e8
PA
3293set auto-connect-native-target
3294
3295 Control whether GDB is allowed to automatically connect to the
3296 native target for the run, attach, etc. commands when not connected
3297 to any target yet. See also "target native" below.
3298
67b5c0c1
MM
3299set record btrace replay-memory-access (read-only|read-write)
3300show record btrace replay-memory-access
3301 Control what memory accesses are allowed during replay.
3302
329ea579
PA
3303maint set target-async (on|off)
3304maint show target-async
5784b3ca
JK
3305 This controls whether GDB targets operate in synchronous or
3306 asynchronous mode. Normally the default is asynchronous, if it is
329ea579 3307 available; but this can be changed to more easily debug problems
5784b3ca 3308 occurring only in synchronous mode.
329ea579
PA
3309
3310set mi-async (on|off)
3311show mi-async
3312 Control whether MI asynchronous mode is preferred. This supersedes
3313 "set target-async" of previous GDB versions.
3314
3315* "set target-async" is deprecated as a CLI option and is now an alias
3316 for "set mi-async" (only puts MI into async mode).
3317
3318* Background execution commands (e.g., "c&", "s&", etc.) are now
3319 possible ``out of the box'' if the target supports them. Previously
3320 the user would need to explicitly enable the possibility with the
3321 "set target-async on" command.
3322
87ce2a04
DE
3323* New features in the GDB remote stub, GDBserver
3324
3325 ** New option --debug-format=option1[,option2,...] allows one to add
3326 additional text to each output. At present only timestamps
3327 are supported: --debug-format=timestamps.
3328 Timestamps can also be turned on with the
3329 "monitor set debug-format timestamps" command from GDB.
3330
5de9129b
MM
3331* The 'record instruction-history' command now starts counting instructions
3332 at one. This also affects the instruction ranges reported by the
3333 'record function-call-history' command when given the /i modifier.
3334
8710b709
MM
3335* The command 'record function-call-history' supports a new modifier '/c' to
3336 indent the function names based on their call stack depth.
3337 The fields for the '/i' and '/l' modifier have been reordered.
3338 The source line range is now prefixed with 'at'.
3339 The instruction range is now prefixed with 'inst'.
3340 Both ranges are now printed as '<from>, <to>' to allow copy&paste to the
3341 "record instruction-history" and "list" commands.
3342
0688d04e
MM
3343* The ranges given as arguments to the 'record function-call-history' and
3344 'record instruction-history' commands are now inclusive.
3345
066ce621 3346* The btrace record target now supports the 'record goto' command.
0b722aec
MM
3347 For locations inside the execution trace, the back trace is computed
3348 based on the information stored in the execution trace.
066ce621 3349
52834460
MM
3350* The btrace record target supports limited reverse execution and replay.
3351 The target does not record data and therefore does not allow reading
3352 memory or registers.
3353
237b092b
AA
3354* The "catch syscall" command now works on s390*-linux* targets.
3355
936d2992
PA
3356* The "compare-sections" command is no longer specific to target
3357 remote. It now works with all targets.
3358
930ee1b1
PA
3359* All native targets are now consistently called "native".
3360 Consequently, the "target child", "target GNU", "target djgpp",
3361 "target procfs" (Solaris/Irix/OSF/AIX) and "target darwin-child"
3362 commands have been replaced with "target native". The QNX/NTO port
3363 leaves the "procfs" target in place and adds a "native" target for
3364 consistency with other ports. The impact on users should be minimal
3365 as these commands previously either throwed an error, or were
3366 no-ops. The target's name is visible in the output of the following
3367 commands: "help target", "info target", "info files", "maint print
3368 target-stack".
3369
6a3cb8e8
PA
3370* The "target native" command now connects to the native target. This
3371 can be used to launch native programs even when "set
3372 auto-connect-native-target" is set to off.
3373
bc504a31 3374* GDB now supports access to Intel MPX registers on GNU/Linux.
dc304a94 3375
bc504a31
PA
3376* Support for Intel AVX-512 registers on GNU/Linux.
3377 Support displaying and modifying Intel AVX-512 registers
dc304a94
JK
3378 $zmm0 - $zmm31 and $k0 - $k7 on GNU/Linux.
3379
969c39fb
MM
3380* New remote packets
3381
3382qXfer:btrace:read's annex
3383 The qXfer:btrace:read packet supports a new annex 'delta' to read
3384 branch trace incrementally.
3385
f7bd0f78
SC
3386* Python Scripting
3387
3388 ** Valid Python operations on gdb.Value objects representing
3389 structs/classes invoke the corresponding overloaded operators if
3390 available.
0c6e92a5
SC
3391 ** New `Xmethods' feature in the Python API. Xmethods are
3392 additional methods or replacements for existing methods of a C++
3393 class. This feature is useful for those cases where a method
3394 defined in C++ source code could be inlined or optimized out by
3395 the compiler, making it unavailable to GDB.
f7bd0f78 3396
36c24d95
UW
3397* New targets
3398PowerPC64 GNU/Linux little-endian powerpc64le-*-linux*
3399
95060284
JB
3400* The "dll-symbols" command, and its two aliases ("add-shared-symbol-files"
3401 and "assf"), have been deprecated. Use the "sharedlibrary" command, or
3402 its alias "share", instead.
3403
7f3c0343
JB
3404* The commands "set remotebaud" and "show remotebaud" are no longer
3405 supported. Use "set serial baud" and "show serial baud" (respectively)
3406 instead.
3407
329ea579
PA
3408* MI changes
3409
3410 ** A new option "-gdb-set mi-async" replaces "-gdb-set
3411 target-async". The latter is left as a deprecated alias of the
3412 former for backward compatibility. If the target supports it,
3413 CLI background execution commands are now always possible by
3414 default, independently of whether the frontend stated a
3415 preference for asynchronous execution with "-gdb-set mi-async".
3416 Previously "-gdb-set target-async off" affected both MI execution
3417 commands and CLI execution commands.
3418
b7bba001 3419*** Changes in GDB 7.7
2d450646 3420
33a97bbe
OJ
3421* Improved support for process record-replay and reverse debugging on
3422 arm*-linux* targets. Support for thumb32 and syscall instruction
3423 recording has been added.
3424
08248ca9
SDJ
3425* GDB now supports SystemTap SDT probes on AArch64 GNU/Linux.
3426
73869dc2
DE
3427* GDB now supports Fission DWP file format version 2.
3428 http://gcc.gnu.org/wiki/DebugFission
3429
a280dbd1
SDJ
3430* New convenience function "$_isvoid", to check whether an expression
3431 is void. A void expression is an expression where the type of the
3432 result is "void". For example, some convenience variables may be
3433 "void" when evaluated (e.g., "$_exitcode" before the execution of
3434 the program being debugged; or an undefined convenience variable).
3435 Another example, when calling a function whose return type is
3436 "void".
3437
52e260a3
DE
3438* The "maintenance print objfiles" command now takes an optional regexp.
3439
9f948660
SDJ
3440* The "catch syscall" command now works on arm*-linux* targets.
3441
901461f8
PA
3442* GDB now consistently shows "<not saved>" when printing values of
3443 registers the debug info indicates have not been saved in the frame
3444 and there's nowhere to retrieve them from
3445 (callee-saved/call-clobbered registers):
3446
3447 (gdb) p $rax
3448 $1 = <not saved>
3449
3450 (gdb) info registers rax
3451 rax <not saved>
3452
3453 Before, the former would print "<optimized out>", and the latter
3454 "*value not available*".
3455
caf26be9
SB
3456* New script contrib/gdb-add-index.sh for adding .gdb_index sections
3457 to binaries.
3458
1e611234
PM
3459* Python scripting
3460
3461 ** Frame filters and frame decorators have been added.
f76c27b5 3462 ** Temporary breakpoints are now supported.
bc79de95 3463 ** Line tables representation has been added.
a16b0e22
SC
3464 ** New attribute 'parent_type' for gdb.Field objects.
3465 ** gdb.Field objects can be used as subscripts on gdb.Value objects.
c0d48811 3466 ** New attribute 'name' for gdb.Type objects.
1e611234 3467
a1217d97
SL
3468* New targets
3469
3470Nios II ELF nios2*-*-elf
3471Nios II GNU/Linux nios2*-*-linux
42059f0e 3472Texas Instruments MSP430 msp430*-*-elf
a1217d97 3473
2659903b
JK
3474* Removed native configurations
3475
3476Support for these a.out NetBSD and OpenBSD obsolete configurations has
3477been removed. ELF variants of these configurations are kept supported.
3478
3479arm*-*-netbsd* but arm*-*-netbsdelf* is kept supported.
3480i[34567]86-*-netbsd* but i[34567]86-*-netbsdelf* is kept supported.
3481i[34567]86-*-openbsd[0-2].* but i[34567]86-*-openbsd* is kept supported.
3482i[34567]86-*-openbsd3.[0-3]
3483m68*-*-netbsd* but m68*-*-netbsdelf* is kept supported.
3484sparc-*-netbsd* but sparc-*-netbsdelf* is kept supported.
3485vax-*-netbsd* but vax-*-netbsdelf* is kept supported.
3486
bd712aed 3487* New commands:
b340913d
TT
3488catch rethrow
3489 Like "catch throw", but catches a re-thrown exception.
7d0c9981
DE
3490maint check-psymtabs
3491 Renamed from old "maint check-symtabs".
3492maint check-symtabs
3493 Perform consistency checks on symtabs.
3494maint expand-symtabs
3495 Expand symtabs matching an optional regexp.
b340913d 3496
dccca75d
EZ
3497show configuration
3498 Display the details of GDB configure-time options.
3499
bd712aed
DE
3500maint set|show per-command
3501maint set|show per-command space
3502maint set|show per-command time
3503maint set|show per-command symtab
3504 Enable display of per-command gdb resource usage.
3505
98297bf6
NB
3506remove-symbol-file FILENAME
3507remove-symbol-file -a ADDRESS
3508 Remove a symbol file added via add-symbol-file. The file to remove
3509 can be identified by its filename or by an address that lies within
3510 the boundaries of this symbol file in memory.
3511
58d06528
JB
3512info exceptions
3513info exceptions REGEXP
3514 Display the list of Ada exceptions defined in the program being
3515 debugged. If provided, only the exceptions whose names match REGEXP
3516 are listed.
3517
bd3eecc3
PA
3518* New options
3519
8fb8eb5c
DE
3520set debug symfile off|on
3521show debug symfile
3522 Control display of debugging info regarding reading symbol files and
3523 symbol tables within those files
3524
e7045703
DE
3525set print raw frame-arguments
3526show print raw frame-arguments
3527 Set/show whether to print frame arguments in raw mode,
3528 disregarding any defined pretty-printers.
3529
bd3eecc3
PA
3530set remote trace-status-packet
3531show remote trace-status-packet
3532 Set/show the use of remote protocol qTStatus packet.
3533
a1217d97
SL
3534set debug nios2
3535show debug nios2
3536 Control display of debugging messages related to Nios II targets.
3537
c1e36e3e
PA
3538set range-stepping
3539show range-stepping
3540 Control whether target-assisted range stepping is enabled.
3541
98882a26
PA
3542set startup-with-shell
3543show startup-with-shell
3544 Specifies whether Unix child processes are started via a shell or
3545 directly.
3546
29453a14
YQ
3547set code-cache
3548show code-cache
3549 Use the target memory cache for accesses to the code segment. This
3550 improves performance of remote debugging (particularly disassembly).
3551
1c2e4450
PA
3552* You can now use a literal value 'unlimited' for options that
3553 interpret 0 or -1 as meaning "unlimited". E.g., "set
3554 trace-buffer-size unlimited" is now an alias for "set
3555 trace-buffer-size -1" and "set height unlimited" is now an alias for
3556 "set height 0".
3557
db0fec5c
DE
3558* The "set debug symtab-create" debugging option of GDB has been changed to
3559 accept a verbosity level. 0 means "off", 1 provides basic debugging
3560 output, and values of 2 or greater provides more verbose output.
3561
dccca75d
EZ
3562* New command-line options
3563--configuration
3564 Display the details of GDB configure-time options.
3565
d0353e76
YQ
3566* The command 'tsave' can now support new option '-ctf' to save trace
3567 buffer in Common Trace Format.
3568
b292c783
JK
3569* Newly installed $prefix/bin/gcore acts as a shell interface for the
3570 GDB command gcore.
3571
09f2921c 3572* GDB now implements the C++ 'typeid' operator.
6e72ca20 3573
b340913d
TT
3574* The new convenience variable $_exception holds the exception being
3575 thrown or caught at an exception-related catchpoint.
3576
3577* The exception-related catchpoints, like "catch throw", now accept a
3578 regular expression which can be used to filter exceptions by type.
3579
0c557179
SDJ
3580* The new convenience variable $_exitsignal is automatically set to
3581 the terminating signal number when the program being debugged dies
3582 due to an uncaught signal.
3583
d0353e76
YQ
3584* MI changes
3585
403cb6b1 3586 ** All MI commands now accept an optional "--language" option.
4e35e808
JB
3587 Support for this feature can be verified by using the "-list-features"
3588 command, which should contain "language-option".
403cb6b1 3589
6b7cbff1
JB
3590 ** The new command -info-gdb-mi-command allows the user to determine
3591 whether a GDB/MI command is supported or not.
3592
2ea126fa
JB
3593 ** The "^error" result record returned when trying to execute an undefined
3594 GDB/MI command now provides a variable named "code" whose content is the
3595 "undefined-command" error code. Support for this feature can be verified
3596 by using the "-list-features" command, which should contain
3597 "undefined-command-error-code".
3598
d0353e76
YQ
3599 ** The -trace-save MI command can optionally save trace buffer in Common
3600 Trace Format now.
3601
c5867ab6
HZ
3602 ** The new command -dprintf-insert sets a dynamic printf breakpoint.
3603
c898adb7
YQ
3604 ** The command -data-list-register-values now accepts an optional
3605 "--skip-unavailable" option. When used, only the available registers
3606 are displayed.
3607
dc673c81
YQ
3608 ** The new command -trace-frame-collected dumps collected variables,
3609 computed expressions, tvars, memory and registers in a traceframe.
3610
6211c335
YQ
3611 ** The commands -stack-list-locals, -stack-list-arguments and
3612 -stack-list-variables now accept an option "--skip-unavailable".
3613 When used, only the available locals or arguments are displayed.
3614
5713b9b5
JB
3615 ** The -exec-run command now accepts an optional "--start" option.
3616 When used, the command follows the same semantics as the "start"
3617 command, stopping the program's execution at the start of its
72bfa06c
JB
3618 main subprogram. Support for this feature can be verified using
3619 the "-list-features" command, which should contain
3620 "exec-run-start-option".
5713b9b5 3621
40555925
JB
3622 ** The new commands -catch-assert and -catch-exceptions insert
3623 catchpoints stopping the program when Ada exceptions are raised.
3624
58d06528
JB
3625 ** The new command -info-ada-exceptions provides the equivalent of
3626 the new "info exceptions" command.
3627
0201faac
JB
3628* New system-wide configuration scripts
3629 A GDB installation now provides scripts suitable for use as system-wide
3630 configuration scripts for the following systems:
3631 ** ElinOS
3632 ** Wind River Linux
3633
c1e36e3e
PA
3634* GDB now supports target-assigned range stepping with remote targets.
3635 This improves the performance of stepping source lines by reducing
3636 the number of control packets from/to GDB. See "New remote packets"
3637 below.
3638
28a93511
YQ
3639* GDB now understands the element 'tvar' in the XML traceframe info.
3640 It has the id of the collected trace state variables.
3641
4ac33720
UW
3642* On S/390 targets that provide the transactional-execution feature,
3643 the program interruption transaction diagnostic block (TDB) is now
3644 represented as a number of additional "registers" in GDB.
3645
c1e36e3e
PA
3646* New remote packets
3647
3648vCont;r
3649
3650 The vCont packet supports a new 'r' action, that tells the remote
3651 stub to step through an address range itself, without GDB
3652 involvemement at each single-step.
3653
7f91dbec
GB
3654qXfer:libraries-svr4:read's annex
3655 The previously unused annex of the qXfer:libraries-svr4:read packet
3656 is now used to support passing an argument list. The remote stub
3657 reports support for this argument list to GDB's qSupported query.
3658 The defined arguments are "start" and "prev", used to reduce work
3659 necessary for library list updating, resulting in significant
3660 speedup.
3661
c2d6af84
PA
3662* New features in the GDB remote stub, GDBserver
3663
3664 ** GDBserver now supports target-assisted range stepping. Currently
3665 enabled on x86/x86_64 GNU/Linux targets.
3666
28a93511
YQ
3667 ** GDBserver now adds element 'tvar' in the XML in the reply to
3668 'qXfer:traceframe-info:read'. It has the id of the collected
3669 trace state variables.
3670
7a60ad40
YQ
3671 ** GDBserver now supports hardware watchpoints on the MIPS GNU/Linux
3672 target.
3673
6fbe845e
AB
3674* New 'z' formatter for printing and examining memory, this displays the
3675 value as hexadecimal zero padded on the left to the size of the type.
3676
9058cc3a
TG
3677* GDB can now use Windows x64 unwinding data.
3678
0d12017b
JB
3679* The "set remotebaud" command has been replaced by "set serial baud".
3680 Similarly, "show remotebaud" has been replaced by "show serial baud".
3681 The "set remotebaud" and "show remotebaud" commands are still available
3682 to provide backward compatibility with older versions of GDB.
3683
2d450646 3684*** Changes in GDB 7.6
80c8d323 3685
59ea5688
MM
3686* Target record has been renamed to record-full.
3687 Record/replay is now enabled with the "record full" command.
3688 This also affects settings that are associated with full record/replay
3689 that have been moved from "set/show record" to "set/show record full":
3690
3691set|show record full insn-number-max
3692set|show record full stop-at-limit
3693set|show record full memory-query
3694
3695* A new record target "record-btrace" has been added. The new target
3696 uses hardware support to record the control-flow of a process. It
3697 does not support replaying the execution, but it implements the
3698 below new commands for investigating the recorded execution log.
3699 This new recording method can be enabled using:
3700
3701record btrace
3702
3703 The "record-btrace" target is only available on Intel Atom processors
3704 and requires a Linux kernel 2.6.32 or later.
3705
3706* Two new commands have been added for record/replay to give information
3707 about the recorded execution without having to replay the execution.
3708 The commands are only supported by "record btrace".
3709
3710record instruction-history prints the execution history at
3711 instruction granularity
3712
3713record function-call-history prints the execution history at
3714 function granularity
3715
543bf33d
AT
3716* New native configurations
3717
51d66578 3718ARM AArch64 GNU/Linux aarch64*-*-linux-gnu
543bf33d 3719FreeBSD/powerpc powerpc*-*-freebsd
4f4352f7 3720x86_64/Cygwin x86_64-*-cygwin*
ea5f3910 3721Tilera TILE-Gx GNU/Linux tilegx*-*-linux-gnu
543bf33d 3722
249729c4
JB
3723* New targets
3724
51d66578
MS
3725ARM AArch64 aarch64*-*-elf
3726ARM AArch64 GNU/Linux aarch64*-*-linux
249729c4 3727Lynx 178 PowerPC powerpc-*-lynx*178
3c095f49 3728x86_64/Cygwin x86_64-*-cygwin*
ea5f3910 3729Tilera TILE-Gx GNU/Linux tilegx*-*-linux
249729c4 3730
e64e0392
DE
3731* If the configured location of system.gdbinit file (as given by the
3732 --with-system-gdbinit option at configure time) is in the
3733 data-directory (as specified by --with-gdb-datadir at configure
3734 time) or in one of its subdirectories, then GDB will look for the
3735 system-wide init file in the directory specified by the
3736 --data-directory command-line option.
3737
07540c15
DE
3738* New command line options:
3739
3740-nh Disables auto-loading of ~/.gdbinit, but still executes all the
3741 other initialization files, unlike -nx which disables all of them.
3742
e93a8774
TT
3743* Removed command line options
3744
3745-epoch This was used by the gdb mode in Epoch, an ancient fork of
3746 Emacs.
3747
53342f27
TT
3748* The 'ptype' and 'whatis' commands now accept an argument to control
3749 type formatting.
3750
451b7c33
TT
3751* 'info proc' now works on some core files.
3752
a72c3253
DE
3753* Python scripting
3754
3755 ** Vectors can be created with gdb.Type.vector.
3756
d7de8e3c
TT
3757 ** Python's atexit.register now works in GDB.
3758
18a9fc12
TT
3759 ** Types can be pretty-printed via a Python API.
3760
9a27f2c6
PK
3761 ** Python 3 is now supported (in addition to Python 2.4 or later)
3762
bea883fd
SCR
3763 ** New class gdb.Architecture exposes GDB's internal representation
3764 of architecture in the Python API.
3765
3766 ** New method Frame.architecture returns the gdb.Architecture object
3767 corresponding to the frame's architecture.
3768
a72c3253
DE
3769* New Python-based convenience functions:
3770
3771 ** $_memeq(buf1, buf2, length)
3772 ** $_streq(str1, str2)
3773 ** $_strlen(str)
3774 ** $_regex(str, regex)
3775
f3c8a52a
JK
3776* The 'cd' command now defaults to using '~' (the home directory) if not
3777 given an argument.
3778
1605ef26
TT
3779* The C++ ABI now defaults to the GNU v3 ABI. This has been the
3780 default for GCC since November 2000.
3781
504b36fd
YQ
3782* The command 'forward-search' can now be abbreviated as 'fo'.
3783
f2a8bc8a
YQ
3784* The command 'info tracepoints' can now display 'installed on target'
3785 or 'not installed on target' for each non-pending location of tracepoint.
3786
23a80689
JB
3787* New configure options
3788
3789--enable-libmcheck/--disable-libmcheck
3790 By default, development versions are built with -lmcheck on hosts
3791 that support it, in order to help track memory corruption issues.
3792 Release versions, on the other hand, are built without -lmcheck
3793 by default. The --enable-libmcheck/--disable-libmcheck configure
3794 options allow the user to override that default.
393fd4c3
YQ
3795--with-babeltrace/--with-babeltrace-include/--with-babeltrace-lib
3796 This configure option allows the user to build GDB with
3797 libbabeltrace using which GDB can read Common Trace Format data.
23a80689 3798
d6b28940
TT
3799* New commands (for set/show, see "New options" below)
3800
ab04a2af
TT
3801catch signal
3802 Catch signals. This is similar to "handle", but allows commands and
3803 conditions to be attached.
3804
d6b28940
TT
3805maint info bfds
3806 List the BFDs known to GDB.
3807
8315665e
YPK
3808python-interactive [command]
3809pi [command]
3810 Start a Python interactive prompt, or evaluate the optional command
3811 and print the result of expressions.
3812
3813py [command]
3814 "py" is a new alias for "python".
3815
18a9fc12
TT
3816enable type-printer [name]...
3817disable type-printer [name]...
3818 Enable or disable type printers.
3819
aa9259cc
TS
3820* Removed commands
3821
3822 ** For the Renesas Super-H architecture, the "regs" command has been removed
3823 (has been deprecated in GDB 7.5), and "info all-registers" should be used
3824 instead.
3825
53342f27
TT
3826* New options
3827
3828set print type methods (on|off)
3829show print type methods
3830 Control whether method declarations are displayed by "ptype".
3831 The default is to show them.
3832
3833set print type typedefs (on|off)
3834show print type typedefs
3835 Control whether typedef definitions are displayed by "ptype".
3836 The default is to show them.
3837
1b56eb55
JK
3838set filename-display basename|relative|absolute
3839show filename-display
3840 Control the way in which filenames is displayed.
3841 The default is "relative", which preserves previous behavior.
3842
e9f1758d
PA
3843set trace-buffer-size
3844show trace-buffer-size
3845 Request target to change the size of trace buffer.
3846
a46c1e42
PA
3847set remote trace-buffer-size-packet auto|on|off
3848show remote trace-buffer-size-packet
3849 Control the use of the remote protocol `QTBuffer:size' packet.
3850
be9a8770
PA
3851set debug aarch64
3852show debug aarch64
3853 Control display of debugging messages related to ARM AArch64.
3854 The default is off.
3855
3856set debug coff-pe-read
3857show debug coff-pe-read
3858 Control display of debugging messages related to reading of COFF/PE
3859 exported symbols.
3860
3861set debug mach-o
3862show debug mach-o
3863 Control display of debugging messages related to Mach-O symbols
3864 processing.
3865
3866set debug notification
3867show debug notification
3868 Control display of debugging info for async remote notification.
3869
5b9afe8a
YQ
3870* MI changes
3871
3872 ** Command parameter changes are now notified using new async record
3873 "=cmd-param-changed".
201b4506
YQ
3874 ** Trace frame changes caused by command "tfind" are now notified using
3875 new async record "=traceframe-changed".
134a2066
YQ
3876 ** The creation, deletion and modification of trace state variables
3877 are now notified using new async records "=tsv-created",
3878 "=tsv-deleted" and "=tsv-modified".
82a90ccf
YQ
3879 ** The start and stop of process record are now notified using new
3880 async record "=record-started" and "=record-stopped".
8de0566d
YQ
3881 ** Memory changes are now notified using new async record
3882 "=memory-changed".
ed8a1c2d 3883 ** The data-disassemble command response will include a "fullname" field
ec83d211 3884 containing the absolute file name when source has been requested.
62747a60
TT
3885 ** New optional parameter COUNT added to the "-data-write-memory-bytes"
3886 command, to allow pattern filling of memory areas.
3fa7bf06
MG
3887 ** New commands "-catch-load"/"-catch-unload" added for intercepting
3888 library load/unload events.
f2a8bc8a
YQ
3889 ** The response to breakpoint commands and breakpoint async records
3890 includes an "installed" field containing a boolean state about each
3891 non-pending tracepoint location is whether installed on target or not.
f5911ea1
HAQ
3892 ** Output of the "-trace-status" command includes a "trace-file" field
3893 containing the name of the trace file being examined. This field is
3894 optional, and only present when examining a trace file.
ec83d211
JK
3895 ** The "fullname" field is now always present along with the "file" field,
3896 even if the file cannot be found by GDB.
5b9afe8a 3897
608e2dbb
TT
3898* GDB now supports the "mini debuginfo" section, .gnu_debugdata.
3899 You must have the LZMA library available when configuring GDB for this
3900 feature to be enabled. For more information, see:
3901 http://fedoraproject.org/wiki/Features/MiniDebugInfo
3902
f6f899bf
HAQ
3903* New remote packets
3904
3905QTBuffer:size
3906 Set the size of trace buffer. The remote stub reports support for this
3907 packet to gdb's qSupported query.
3908
10782d74
MM
3909Qbtrace:bts
3910 Enable Branch Trace Store (BTS)-based branch tracing for the current
3911 thread. The remote stub reports support for this packet to gdb's
3912 qSupported query.
3913
3914Qbtrace:off
3915 Disable branch tracing for the current thread. The remote stub reports
3916 support for this packet to gdb's qSupported query.
3917
3918qXfer:btrace:read
3919 Read the traced branches for the current thread. The remote stub
3920 reports support for this packet to gdb's qSupported query.
3921
80c8d323 3922*** Changes in GDB 7.5
d6e00af6 3923
1b3371b1
L
3924* GDB now supports x32 ABI. Visit <http://sites.google.com/site/x32abi/>
3925 for more x32 ABI info.
3926
d0e64392
MR
3927* GDB now supports access to MIPS DSP registers on Linux targets.
3928
4cc0665f
MR
3929* GDB now supports debugging microMIPS binaries.
3930
85d4a676
SS
3931* The "info os" command on GNU/Linux can now display information on
3932 several new classes of objects managed by the operating system:
3933 "info os procgroups" lists process groups
3934 "info os files" lists file descriptors
3935 "info os sockets" lists internet-domain sockets
3936 "info os shm" lists shared-memory regions
3937 "info os semaphores" lists semaphores
3938 "info os msg" lists message queues
3939 "info os modules" lists loaded kernel modules
3940
55aa24fb
SDJ
3941* GDB now has support for SDT (Static Defined Tracing) probes. Currently,
3942 the only implemented backend is for SystemTap probes (<sys/sdt.h>). You
3943 can set a breakpoint using the new "-probe, "-pstap" or "-probe-stap"
3944 options and inspect the probe arguments using the new $_probe_arg family
3945 of convenience variables. You can obtain more information about SystemTap
3946 in <http://sourceware.org/systemtap/>.
3947
72508ac0
PO
3948* GDB now supports reversible debugging on ARM, it allows you to
3949 debug basic ARM and THUMB instructions, and provides
3950 record/replay support.
3951
16899756
DE
3952* The option "symbol-reloading" has been deleted as it is no longer used.
3953
4795f398
DE
3954* Python scripting
3955
7d74f244
DE
3956 ** GDB commands implemented in Python can now be put in command class
3957 "gdb.COMMAND_USER".
3958
4795f398
DE
3959 ** The "maint set python print-stack on|off" is now deleted.
3960
50897289
TT
3961 ** A new class, gdb.printing.FlagEnumerationPrinter, can be used to
3962 apply "flag enum"-style pretty-printing to any enum.
3963
64e7d9dd
TT
3964 ** gdb.lookup_symbol can now work when there is no current frame.
3965
3966 ** gdb.Symbol now has a 'line' attribute, holding the line number in
3967 the source at which the symbol was defined.
3968
f0823d2c
TT
3969 ** gdb.Symbol now has the new attribute 'needs_frame' and the new
3970 method 'value'. The former indicates whether the symbol needs a
3971 frame in order to compute its value, and the latter computes the
3972 symbol's value.
3973
7b282c5a
SCR
3974 ** A new method 'referenced_value' on gdb.Value objects which can
3975 dereference pointer as well as C++ reference values.
3976
a20ee7a4
SCR
3977 ** New methods 'global_block' and 'static_block' on gdb.Symtab objects
3978 which return the global and static blocks (as gdb.Block objects),
3979 of the underlying symbol table, respectively.
3980
7efc75aa
SCR
3981 ** New function gdb.find_pc_line which returns the gdb.Symtab_and_line
3982 object associated with a PC value.
3983
ee0bf529
SCR
3984 ** gdb.Symtab_and_line has new attribute 'last' which holds the end
3985 of the address range occupied by code for the current source line.
3986
a766d390
DE
3987* Go language support.
3988 GDB now supports debugging programs written in the Go programming
3989 language.
3990
e0f9f062
DE
3991* GDBserver now supports stdio connections.
3992 E.g. (gdb) target remote | ssh myhost gdbserver - hello
3993
217bff3e
JK
3994* The binary "gdbtui" can no longer be built or installed.
3995 Use "gdb -tui" instead.
3996
cafec441
TT
3997* GDB will now print "flag" enums specially. A flag enum is one where
3998 all the enumerator values have no bits in common when pairwise
3999 "and"ed. When printing a value whose type is a flag enum, GDB will
4000 show all the constants, e.g., for enum E { ONE = 1, TWO = 2}:
4001 (gdb) print (enum E) 3
4002 $1 = (ONE | TWO)
4003
4aac40c8
TT
4004* The filename part of a linespec will now match trailing components
4005 of a source file name. For example, "break gcc/expr.c:1000" will
4006 now set a breakpoint in build/gcc/expr.c, but not
4007 build/libcpp/expr.c.
4008
d99bd577
UW
4009* The "info proc" and "generate-core-file" commands will now also
4010 work on remote targets connected to GDBserver on Linux.
4011
53fe1783
GB
4012* The command "info catch" has been removed. It has been disabled
4013 since December 2007.
4014
e41eec66
JB
4015* The "catch exception" and "catch assert" commands now accept
4016 a condition at the end of the command, much like the "break"
4017 command does. For instance:
4018
4019 (gdb) catch exception Constraint_Error if Barrier = True
4020
4021 Previously, it was possible to add a condition to such catchpoints,
4022 but it had to be done as a second step, after the catchpoint had been
4023 created, using the "condition" command.
4024
5808517f
YQ
4025* The "info static-tracepoint-marker" command will now also work on
4026 native Linux targets with in-process agent.
4027
481860b3
GB
4028* GDB can now set breakpoints on inlined functions.
4029
4030* The .gdb_index section has been updated to include symbols for
4031 inlined functions. GDB will ignore older .gdb_index sections by
4032 default, which could cause symbol files to be loaded more slowly
e615022a
DE
4033 until their .gdb_index sections can be recreated. The new command
4034 "set use-deprecated-index-sections on" will cause GDB to use any older
4035 .gdb_index sections it finds. This will restore performance, but the
4036 ability to set breakpoints on inlined functions will be lost in symbol
4037 files with older .gdb_index sections.
481860b3 4038
156942c7
DE
4039 The .gdb_index section has also been updated to record more information
4040 about each symbol. This speeds up the "info variables", "info functions"
4041 and "info types" commands when used with programs having the .gdb_index
4042 section, as well as speeding up debugging with shared libraries using
4043 the .gdb_index section.
4044
927fbba6
JB
4045* Ada support for GDB/MI Variable Objects has been added.
4046
20388dd6
YQ
4047* GDB can now support 'breakpoint always-inserted mode' in 'record'
4048 target.
4049
f3e0e960
SS
4050* MI changes
4051
4052 ** New command -info-os is the MI equivalent of "info os".
4053
37ce89eb
SS
4054 ** Output logs ("set logging" and related) now include MI output.
4055
edcc5120
TT
4056* New commands
4057
e615022a
DE
4058 ** "set use-deprecated-index-sections on|off"
4059 "show use-deprecated-index-sections on|off"
4060 Controls the use of deprecated .gdb_index sections.
4061
edcc5120
TT
4062 ** "catch load" and "catch unload" can be used to stop when a shared
4063 library is loaded or unloaded, respectively.
4064
816338b5
SS
4065 ** "enable count" can be used to auto-disable a breakpoint after
4066 several hits.
4067
57651221 4068 ** "info vtbl" can be used to show the virtual method tables for
c4aeac85
TT
4069 C++ and Java objects.
4070
06fc020f 4071 ** "explore" and its sub commands "explore value" and "explore type"
6ea71545 4072 can be used to recursively explore values and types of
06fc020f
SCR
4073 expressions. These commands are available only if GDB is
4074 configured with '--with-python'.
4075
bf88dd68
JK
4076 ** "info auto-load" shows status of all kinds of auto-loaded files,
4077 "info auto-load gdb-scripts" shows status of auto-loading GDB canned
4078 sequences of commands files, "info auto-load python-scripts"
4079 shows status of auto-loading Python script files,
4080 "info auto-load local-gdbinit" shows status of loading init file
4081 (.gdbinit) from current directory and "info auto-load libthread-db" shows
4082 status of inferior specific thread debugging shared library loading.
4083
4084 ** "info auto-load-scripts", "set auto-load-scripts on|off"
4085 and "show auto-load-scripts" commands have been deprecated, use their
4086 "info auto-load python-scripts", "set auto-load python-scripts on|off"
4087 and "show auto-load python-scripts" counterparts instead.
4088
e7e0cddf
SS
4089 ** "dprintf location,format,args..." creates a dynamic printf, which
4090 is basically a breakpoint that does a printf and immediately
4091 resumes your program's execution, so it is like a printf that you
4092 can insert dynamically at runtime instead of at compiletime.
4093
9cb709b6
TT
4094 ** "set print symbol"
4095 "show print symbol"
4096 Controls whether GDB attempts to display the symbol, if any,
4097 corresponding to addresses it prints. This defaults to "on", but
4098 you can set it to "off" to restore GDB's previous behavior.
4099
2d4c29c5
TS
4100* Deprecated commands
4101
4102 ** For the Renesas Super-H architecture, the "regs" command has been
4103 deprecated, and "info all-registers" should be used instead.
4104
a58b110a
KB
4105* New targets
4106
4107Renesas RL78 rl78-*-elf
60c9a3c0 4108HP OpenVMS ia64 ia64-hp-openvms*
a58b110a 4109
72895ff6
LM
4110* GDBserver supports evaluation of breakpoint conditions. When
4111 support is advertised by GDBserver, GDB may be told to send the
4112 breakpoint conditions in bytecode form to GDBserver. GDBserver
4113 will only report the breakpoint trigger to GDB when its condition
4114 evaluates to true.
4115
4116* New options
4117
4cc0665f
MR
4118set mips compression
4119show mips compression
4120 Select the compressed ISA encoding used in functions that have no symbol
4121 information available. The encoding can be set to either of:
4122 mips16
4123 micromips
4124 and is updated automatically from ELF file flags if available.
4125
72895ff6
LM
4126set breakpoint condition-evaluation
4127show breakpoint condition-evaluation
cf65ecd3 4128 Control whether breakpoint conditions are evaluated by GDB ("host") or by
5b43fab2
JK
4129 GDBserver ("target"). Default option "auto" chooses the most efficient
4130 available mode.
72895ff6
LM
4131 This option can improve debugger efficiency depending on the speed of the
4132 target.
4133
bf88dd68
JK
4134set auto-load off
4135 Disable auto-loading globally.
4136
4137show auto-load
4138 Show auto-loading setting of all kinds of auto-loaded files.
4139
4140set auto-load gdb-scripts on|off
4141show auto-load gdb-scripts
4142 Control auto-loading of GDB canned sequences of commands files.
4143
4144set auto-load python-scripts on|off
4145show auto-load python-scripts
4146 Control auto-loading of Python script files.
4147
4148set auto-load local-gdbinit on|off
4149show auto-load local-gdbinit
4150 Control loading of init file (.gdbinit) from current directory.
4151
4152set auto-load libthread-db on|off
4153show auto-load libthread-db
4154 Control auto-loading of inferior specific thread debugging shared library.
4155
7349ff92 4156set auto-load scripts-directory <dir1>[:<dir2>...]
9cc815f5 4157show auto-load scripts-directory
7349ff92
JK
4158 Set a list of directories from which to load auto-loaded scripts.
4159 Automatically loaded Python scripts and GDB scripts are located in one
4160 of the directories listed by this option.
4161 The delimiter (':' above) may differ according to the host platform.
4162
bccbefd2
JK
4163set auto-load safe-path <dir1>[:<dir2>...]
4164show auto-load safe-path
4165 Set a list of directories from which it is safe to auto-load files.
4166 The delimiter (':' above) may differ according to the host platform.
4167
4dc84fd1
JK
4168set debug auto-load on|off
4169show debug auto-load
4170 Control display of debugging info for auto-loading the files above.
4171
d3ce09f5 4172set dprintf-style gdb|call|agent
e7e0cddf 4173show dprintf-style
d3ce09f5
SS
4174 Control the way in which a dynamic printf is performed; "gdb"
4175 requests a GDB printf command, while "call" causes dprintf to call a
4176 function in the inferior. "agent" requests that the target agent
4177 (such as GDBserver) do the printing.
e7e0cddf
SS
4178
4179set dprintf-function <expr>
4180show dprintf-function
4181set dprintf-channel <expr>
4182show dprintf-channel
4183 Set the function and optional first argument to the call when using
4184 the "call" style of dynamic printf.
4185
d3ce09f5
SS
4186set disconnected-dprintf on|off
4187show disconnected-dprintf
4188 Control whether agent-style dynamic printfs continue to be in effect
4189 after GDB disconnects.
4190
6dea1fbd
JK
4191* New configure options
4192
7349ff92
JK
4193--with-auto-load-dir
4194 Configure default value for the 'set auto-load scripts-directory'
1564a261
JK
4195 setting above. It defaults to '$debugdir:$datadir/auto-load',
4196 $debugdir representing global debugging info directories (available
4197 via 'show debug-file-directory') and $datadir representing GDB's data
4198 directory (available via 'show data-directory').
7349ff92 4199
6dea1fbd
JK
4200--with-auto-load-safe-path
4201 Configure default value for the 'set auto-load safe-path' setting
7349ff92 4202 above. It defaults to the --with-auto-load-dir setting.
6dea1fbd
JK
4203
4204--without-auto-load-safe-path
4205 Set 'set auto-load safe-path' to '/', effectively disabling this
4206 security feature.
4207
72895ff6
LM
4208* New remote packets
4209
74c48cbb
PA
4210z0/z1 conditional breakpoints extension
4211
72895ff6
LM
4212 The z0/z1 breakpoint insertion packets have been extended to carry
4213 a list of conditional expressions over to the remote stub depending on the
4214 condition evaluation mode. The use of this extension can be controlled
4215 via the "set remote conditional-breakpoints-packet" command.
4216
9b224c5e
PA
4217QProgramSignals:
4218
4219 Specify the signals which the remote stub may pass to the debugged
4220 program without GDB involvement.
4221
8320cc4f
JK
4222* New command line options
4223
4224--init-command=FILE, -ix Like --command, -x but execute it
4225 before loading inferior.
4226--init-eval-command=COMMAND, -iex Like --eval-command=COMMAND, -ex but
4227 execute it before loading inferior.
4228
8837a20f
JB
4229*** Changes in GDB 7.4
4230
f8eba3c6
TT
4231* GDB now handles ambiguous linespecs more consistently; the existing
4232 FILE:LINE support has been expanded to other types of linespecs. A
4233 breakpoint will now be set on all matching locations in all
4234 inferiors, and locations will be added or removed according to
4235 inferior changes.
4236
1bfeeb0f
JL
4237* GDB now allows you to skip uninteresting functions and files when
4238 stepping with the "skip function" and "skip file" commands.
4239
480a3f21
PW
4240* GDB has two new commands: "set remote hardware-watchpoint-length-limit"
4241 and "show remote hardware-watchpoint-length-limit". These allows to
4242 set or show the maximum length limit (in bytes) of a remote
4243 target hardware watchpoint.
4244
4245 This allows e.g. to use "unlimited" hardware watchpoints with the
4246 gdbserver integrated in Valgrind version >= 3.7.0. Such Valgrind
4247 watchpoints are slower than real hardware watchpoints but are
4248 significantly faster than gdb software watchpoints.
4249
3a7bf607
PM
4250* Python scripting
4251
32d1c362 4252 ** The register_pretty_printer function in module gdb.printing now takes
7d0aff21 4253 an optional `replace' argument. If True, the new printer replaces any
32d1c362
DE
4254 existing one.
4255
3a7bf607 4256 ** The "maint set python print-stack on|off" command has been
4795f398
DE
4257 deprecated and will be deleted in GDB 7.5.
4258 A new command: "set python print-stack none|full|message" has
4259 replaced it. Additionally, the default for "print-stack" is
4260 now "message", which just prints the error message without
4261 the stack trace.
3a7bf607 4262
baacfb07 4263 ** A prompt substitution hook (prompt_hook) is now available to the
3a7bf607 4264 Python API.
713389e0 4265
fa3a4f15
PM
4266 ** A new Python module, gdb.prompt has been added to the GDB Python
4267 modules library. This module provides functionality for
baacfb07 4268 escape sequences in prompts (used by set/show
fa3a4f15
PM
4269 extended-prompt). These escape sequences are replaced by their
4270 corresponding value.
4271
5e239b84
PM
4272 ** Python commands and convenience-functions located in
4273 'data-directory'/python/gdb/command and
4274 'data-directory'/python/gdb/function are now automatically loaded
4275 on GDB start-up.
4276
9df2fbc4
PM
4277 ** Blocks now provide four new attributes. global_block and
4278 static_block will return the global and static blocks
4279 respectively. is_static and is_global are boolean attributes
4280 that indicate if the block is one of those two types.
4281
457e09f0
DE
4282 ** Symbols now provide the "type" attribute, the type of the symbol.
4283
6839b47f
KP
4284 ** The "gdb.breakpoint" function has been deprecated in favor of
4285 "gdb.breakpoints".
4286
cc72b2a2
KP
4287 ** A new class "gdb.FinishBreakpoint" is provided to catch the return
4288 of a function. This class is based on the "finish" command
4289 available in the CLI.
4290
84ad80e6
PK
4291 ** Type objects for struct and union types now allow access to
4292 the fields using standard Python dictionary (mapping) methods.
4293 For example, "some_type['myfield']" now works, as does
4294 "some_type.items()".
4295
20c168b5
KP
4296 ** A new event "gdb.new_objfile" has been added, triggered by loading a
4297 new object file.
4298
03c3051a
PK
4299 ** A new function, "deep_items" has been added to the gdb.types
4300 module in the GDB Python modules library. This function returns
4301 an iterator over the fields of a struct or union type. Unlike
4302 the standard Python "iteritems" method, it will recursively traverse
4303 any anonymous fields.
4304
7376e450
TT
4305* MI changes
4306
4307 ** "*stopped" events can report several new "reason"s, such as
4308 "solib-event".
4309
4310 ** Breakpoint changes are now notified using new async records, like
4311 "=breakpoint-modified".
4312
4313 ** New command -ada-task-info.
4314
98a5dd13
DE
4315* libthread-db-search-path now supports two special values: $sdir and $pdir.
4316 $sdir specifies the default system locations of shared libraries.
4317 $pdir specifies the directory where the libpthread used by the application
4318 lives.
4319
4320 GDB no longer looks in $sdir and $pdir after it has searched the directories
4321 mentioned in libthread-db-search-path. If you want to search those
4322 directories, they must be specified in libthread-db-search-path.
4323 The default value of libthread-db-search-path on GNU/Linux and Solaris
4324 systems is now "$sdir:$pdir".
4325
4326 $pdir is not supported by gdbserver, it is currently ignored.
4327 $sdir is supported by gdbserver.
4328
478aac75
DE
4329* New configure option --with-iconv-bin.
4330 When using the internationalization support like the one in the GNU C
4331 library, GDB will invoke the "iconv" program to get a list of supported
4332 character sets. If this program lives in a non-standard location, one can
4333 use this option to specify where to find it.
4334
9c06b0b4
TJB
4335* When natively debugging programs on PowerPC BookE processors running
4336 a Linux kernel version 2.6.34 or later, GDB supports masked hardware
4337 watchpoints, which specify a mask in addition to an address to watch.
4338 The mask specifies that some bits of an address (the bits which are
4339 reset in the mask) should be ignored when matching the address accessed
4340 by the inferior against the watchpoint address. See the "PowerPC Embedded"
4341 section in the user manual for more details.
4342
03f2bd59
JK
4343* The new option --once causes GDBserver to stop listening for connections once
4344 the first connection is made. The listening port used by GDBserver will
4345 become available after that.
4346
71eba9c2 4347* New commands "info macros" and "alias" have been added.
edc84990 4348
2bda9cc5
JK
4349* New function parameters suffix @entry specifies value of function parameter
4350 at the time the function got called. Entry values are available only since
4351 gcc version 4.7.
4352
ed59ded5
DE
4353* New commands
4354
4355!SHELL COMMAND
4356 "!" is now an alias of the "shell" command.
4357 Note that no space is needed between "!" and SHELL COMMAND.
4358
9c06b0b4
TJB
4359* Changed commands
4360
4361watch EXPRESSION mask MASK_VALUE
4362 The watch command now supports the mask argument which allows creation
4363 of masked watchpoints, if the current architecture supports this feature.
4364
dbaefcf7
DE
4365info auto-load-scripts [REGEXP]
4366 This command was formerly named "maintenance print section-scripts".
4367 It is now generally useful and is no longer a maintenance-only command.
4368
71eba9c2 4369info macro [-all] [--] MACRO
4370 The info macro command has new options `-all' and `--'. The first for
4371 printing all definitions of a macro. The second for explicitly specifying
4372 the end of arguments and the beginning of the macro name in case the macro
4373 name starts with a hyphen.
4374
3065dfb6
SS
4375collect[/s] EXPRESSIONS
4376 The tracepoint collect command now takes an optional modifier "/s"
4377 that directs it to dereference pointer-to-character types and
4378 collect the bytes of memory up to a zero byte. The behavior is
4379 similar to what you see when you use the regular print command on a
4380 string. An optional integer following the "/s" sets a bound on the
4381 number of bytes that will be collected.
4382
f196051f
SS
4383tstart [NOTES]
4384 The trace start command now interprets any supplied arguments as a
4385 note to be recorded with the trace run, with an effect similar to
4386 setting the variable trace-notes.
4387
4388tstop [NOTES]
4389 The trace stop command now interprets any arguments as a note to be
4390 mentioned along with the tstatus report that the trace was stopped
4391 with a command. The effect is similar to setting the variable
4392 trace-stop-notes.
4393
d248b706
KY
4394* Tracepoints can now be enabled and disabled at any time after a trace
4395 experiment has been started using the standard "enable" and "disable"
4396 commands. It is now possible to start a trace experiment with no enabled
4397 tracepoints; GDB will display a warning, but will allow the experiment to
4398 begin, assuming that tracepoints will be enabled as needed while the trace
4399 is running.
4400
405f8e94
SS
4401* Fast tracepoints on 32-bit x86-architectures can now be placed at
4402 locations with 4-byte instructions, when they were previously
4403 limited to locations with instructions of 5 bytes or longer.
4404
2bda9cc5
JK
4405* New options
4406
45cfd468
DE
4407set debug dwarf2-read
4408show debug dwarf2-read
4409 Turns on or off display of debugging messages related to reading
4410 DWARF debug info. The default is off.
4411
4412set debug symtab-create
4413show debug symtab-create
4414 Turns on or off display of debugging messages related to symbol table
4415 creation. The default is off.
4416
baacfb07
PM
4417set extended-prompt
4418show extended-prompt
4419 Set the GDB prompt, and allow escape sequences to be inserted to
4420 display miscellaneous information (see 'help set extended-prompt'
4421 for the list of sequences). This prompt (and any information
4422 accessed through the escape sequences) is updated every time the
4423 prompt is displayed.
4424
2bda9cc5
JK
4425set print entry-values (both|compact|default|if-needed|no|only|preferred)
4426show print entry-values
4427 Set printing of frame argument values at function entry. In some cases
4428 GDB can determine the value of function argument which was passed by the
4429 function caller, even if the value was modified inside the called function.
4430
4431set debug entry-values
4432show debug entry-values
4433 Control display of debugging info for determining frame argument values at
4434 function entry and virtual tail call frames.
4435
c011a4f4
DE
4436set basenames-may-differ
4437show basenames-may-differ
4438 Set whether a source file may have multiple base names.
4439 (A "base name" is the name of a file with the directory part removed.
4440 Example: The base name of "/home/user/hello.c" is "hello.c".)
4441 If set, GDB will canonicalize file names (e.g., expand symlinks)
4442 before comparing them. Canonicalization is an expensive operation,
4443 but it allows the same file be known by more than one base name.
4444 If not set (the default), all source files are assumed to have just
4445 one base name, and gdb will do file name comparisons more efficiently.
4446
f196051f
SS
4447set trace-user
4448show trace-user
4449set trace-notes
4450show trace-notes
4451 Set a user name and notes for the current and any future trace runs.
4452 This is useful for long-running and/or disconnected traces, to
4453 inform others (or yourself) as to who is running the trace, supply
4454 contact information, or otherwise explain what is going on.
4455
4456set trace-stop-notes
4457show trace-stop-notes
4458 Set a note attached to the trace run, that is displayed when the
4459 trace has been stopped by a tstop command. This is useful for
4460 instance as an explanation, if you are stopping a trace run that was
4461 started by someone else.
4462
d248b706
KY
4463* New remote packets
4464
4465QTEnable
4466
4467 Dynamically enable a tracepoint in a started trace experiment.
4468
4469QTDisable
4470
4471 Dynamically disable a tracepoint in a started trace experiment.
4472
f196051f
SS
4473QTNotes
4474
4475 Set the user and notes of the trace run.
4476
4477qTP
4478
4479 Query the current status of a tracepoint.
4480
405f8e94
SS
4481qTMinFTPILen
4482
4483 Query the minimum length of instruction at which a fast tracepoint may
4484 be placed.
4485
1a532630
PP
4486* Dcache size (number of lines) and line-size are now runtime-configurable
4487 via "set dcache line" and "set dcache line-size" commands.
4488
11315641
YQ
4489* New targets
4490
4491Texas Instruments TMS320C6x tic6x-*-*
4492
87326c78
DD
4493* New Simulators
4494
4495Renesas RL78 rl78-*-elf
4496
e8d56f18
JB
4497*** Changes in GDB 7.3.1
4498
4499* The build failure for NetBSD and OpenBSD targets have now been fixed.
4500
d6e00af6 4501*** Changes in GDB 7.3
797054e6 4502
60f98dde
MS
4503* GDB has a new command: "thread find [REGEXP]".
4504 It finds the thread id whose name, target id, or thread extra info
4505 matches the given regular expression.
4506
eee5b35e
DD
4507* The "catch syscall" command now works on mips*-linux* targets.
4508
b716877b
AB
4509* The -data-disassemble MI command now supports modes 2 and 3 for
4510 dumping the instruction opcodes.
4511
aae1c79a
DE
4512* New command line options
4513
4514-data-directory DIR Specify DIR as the "data-directory".
4515 This is mostly for testing purposes.
4516
a86caf66
DE
4517* The "maint set python auto-load on|off" command has been renamed to
4518 "set auto-load-scripts on|off".
4519
99e7ae30
DE
4520* GDB has a new command: "set directories".
4521 It is like the "dir" command except that it replaces the
4522 source path list instead of augmenting it.
4523
4694da01
TT
4524* GDB now understands thread names.
4525
4526 On GNU/Linux, "info threads" will display the thread name as set by
4527 prctl or pthread_setname_np.
4528
4529 There is also a new command, "thread name", which can be used to
4530 assign a name internally for GDB to display.
4531
f4b8a18d
KW
4532* OpenCL C
4533 Initial support for the OpenCL C language (http://www.khronos.org/opencl)
4534 has been integrated into GDB.
4535
585d1eb8
PM
4536* Python scripting
4537
da5d4055
PM
4538 ** The function gdb.Write now accepts an optional keyword 'stream'.
4539 This keyword, when provided, will direct the output to either
4540 stdout, stderr, or GDB's logging output.
4541
9a6f1302
PM
4542 ** Parameters can now be be sub-classed in Python, and in particular
4543 you may implement the get_set_doc and get_show_doc functions.
4544 This improves how Parameter set/show documentation is processed
4545 and allows for more dynamic content.
4546
29703da4
PM
4547 ** Symbols, Symbol Table, Symbol Table and Line, Object Files,
4548 Inferior, Inferior Thread, Blocks, and Block Iterator APIs now
4549 have an is_valid method.
4550
350c6c65
PM
4551 ** Breakpoints can now be sub-classed in Python, and in particular
4552 you may implement a 'stop' function that is executed each time
4553 the inferior reaches that breakpoint.
4554
6e6fbe60
DE
4555 ** New function gdb.lookup_global_symbol looks up a global symbol.
4556
585d1eb8
PM
4557 ** GDB values in Python are now callable if the value represents a
4558 function. For example, if 'some_value' represents a function that
4559 takes two integer parameters and returns a value, you can call
4560 that function like so:
4561
4562 result = some_value (10,20)
4563
0e3509db
DE
4564 ** Module gdb.types has been added.
4565 It contains a collection of utilities for working with gdb.Types objects:
4566 get_basic_type, has_field, make_enum_dict.
4567
7b51bc51
DE
4568 ** Module gdb.printing has been added.
4569 It contains utilities for writing and registering pretty-printers.
4570 New classes: PrettyPrinter, SubPrettyPrinter,
4571 RegexpCollectionPrettyPrinter.
4572 New function: register_pretty_printer.
4573
4574 ** New commands "info pretty-printers", "enable pretty-printer" and
4575 "disable pretty-printer" have been added.
4576
99e7ae30
DE
4577 ** gdb.parameter("directories") is now available.
4578
d8e22779
TT
4579 ** New function gdb.newest_frame returns the newest frame in the
4580 selected thread.
4581
4694da01
TT
4582 ** The gdb.InferiorThread class has a new "name" attribute. This
4583 holds the thread's name.
4584
505500db
SW
4585 ** Python Support for Inferior events.
4586 Python scripts can add observers to be notified of events
824446ad 4587 occurring in the process being debugged.
c17a9e46
HZ
4588 The following events are currently supported:
4589 - gdb.events.cont Continue event.
4590 - gdb.events.exited Inferior exited event.
4591 - gdb.events.stop Signal received, and Breakpoint hit events.
4592
def98928
TT
4593* C++ Improvements:
4594
4595 ** GDB now puts template parameters in scope when debugging in an
4596 instantiation. For example, if you have:
4597
4598 template<int X> int func (void) { return X; }
4599
4600 then if you step into func<5>, "print X" will show "5". This
4601 feature requires proper debuginfo support from the compiler; it
4602 was added to GCC 4.5.
4603
66cb8159
TT
4604 ** The motion commands "next", "finish", "until", and "advance" now
4605 work better when exceptions are thrown. In particular, GDB will
4606 no longer lose control of the inferior; instead, the GDB will
4607 stop the inferior at the point at which the exception is caught.
4608 This functionality requires a change in the exception handling
4609 code that was introduced in GCC 4.5.
4610
4aac0db7
UW
4611* GDB now follows GCC's rules on accessing volatile objects when
4612 reading or writing target state during expression evaluation.
4613 One notable difference to prior behavior is that "print x = 0"
4614 no longer generates a read of x; the value of the assignment is
4615 now always taken directly from the value being assigned.
4616
283e6a52
TT
4617* GDB now has some support for using labels in the program's source in
4618 linespecs. For instance, you can use "advance label" to continue
4619 execution to a label.
4620
4621* GDB now has support for reading and writing a new .gdb_index
4622 section. This section holds a fast index of DWARF debugging
4623 information and can be used to greatly speed up GDB startup and
4624 operation. See the documentation for `save gdb-index' for details.
4625
b56df873 4626* The "watch" command now accepts an optional "-location" argument.
14c0d4e1 4627 When used, this causes GDB to watch the memory referred to by the
b56df873
TT
4628 expression. Such a watchpoint is never deleted due to it going out
4629 of scope.
4630
ae53ffa4
PA
4631* GDB now supports thread debugging of core dumps on GNU/Linux.
4632
4633 GDB now activates thread debugging using the libthread_db library
4634 when debugging GNU/Linux core dumps, similarly to when debugging
4635 live processes. As a result, when debugging a core dump file, GDB
4636 is now able to display pthread_t ids of threads. For example, "info
4637 threads" shows the same output as when debugging the process when it
4638 was live. In earlier releases, you'd see something like this:
4639
4640 (gdb) info threads
4641 * 1 LWP 6780 main () at main.c:10
4642
4643 While now you see this:
4644
4645 (gdb) info threads
4646 * 1 Thread 0x7f0f5712a700 (LWP 6780) main () at main.c:10
4647
4648 It is also now possible to inspect TLS variables when debugging core
4649 dumps.
4650
4651 When debugging a core dump generated on a machine other than the one
4652 used to run GDB, you may need to point GDB at the correct
4653 libthread_db library with the "set libthread-db-search-path"
4654 command. See the user manual for more details on this command.
4655
f1310107
TJB
4656* When natively debugging programs on PowerPC BookE processors running
4657 a Linux kernel version 2.6.34 or later, GDB supports ranged breakpoints,
4658 which stop execution of the inferior whenever it executes an instruction
4659 at any address within the specified range. See the "PowerPC Embedded"
4660 section in the user manual for more details.
4661
248c9dbc
JB
4662* New features in the GDB remote stub, GDBserver
4663
1aee7009
JB
4664 ** GDBserver is now supported on PowerPC LynxOS (versions 4.x and 5.x),
4665 and i686 LynxOS (version 5.x).
248c9dbc 4666
eb826dc6
MF
4667 ** GDBserver is now supported on Blackfin Linux.
4668
44603653
JB
4669* New native configurations
4670
4671ia64 HP-UX ia64-*-hpux*
4672
91021223
MF
4673* New targets:
4674
4675Analog Devices, Inc. Blackfin Processor bfin-*
4676
6e1bb179
JB
4677* Ada task switching is now supported on sparc-elf targets when
4678 debugging a program using the Ravenscar Profile. For more information,
4679 see the "Tasking Support when using the Ravenscar Profile" section
4680 in the GDB user manual.
4681
50c97f38
TT
4682* Guile support was removed.
4683
448a92bf
MF
4684* New features in the GNU simulator
4685
4686 ** The --map-info flag lists all known core mappings.
4687
66ee2731
MF
4688 ** CFI flashes may be simulated via the "cfi" device.
4689
76b8507d 4690*** Changes in GDB 7.2
bfbf3774 4691
ba25b921
PA
4692* Shared library support for remote targets by default
4693
4694 When GDB is configured for a generic, non-OS specific target, like
4695 for example, --target=arm-eabi or one of the many *-*-elf targets,
4696 GDB now queries remote stubs for loaded shared libraries using the
4697 `qXfer:libraries:read' packet. Previously, shared library support
4698 was always disabled for such configurations.
4699
4656f5c6
SW
4700* C++ Improvements:
4701
4702 ** Argument Dependent Lookup (ADL)
4703
4704 In C++ ADL lookup directs function search to the namespaces of its
4705 arguments even if the namespace has not been imported.
4706 For example:
4707 namespace A
4708 {
4709 class B { };
4710 void foo (B) { }
4711 }
4712 ...
4713 A::B b
4714 foo(b)
4715 Here the compiler will search for `foo' in the namespace of 'b'
4716 and find A::foo. GDB now supports this. This construct is commonly
4717 used in the Standard Template Library for operators.
4718
4719 ** Improved User Defined Operator Support
4720
4721 In addition to member operators, GDB now supports lookup of operators
4722 defined in a namespace and imported with a `using' directive, operators
4723 defined in the global scope, operators imported implicitly from an
4724 anonymous namespace, and the ADL operators mentioned in the previous
4725 entry.
4726 GDB now also supports proper overload resolution for all the previously
4727 mentioned flavors of operators.
4728
254e6b9e
DE
4729 ** static const class members
4730
4731 Printing of static const class members that are initialized in the
4732 class definition has been fixed.
4733
711e434b
PM
4734* Windows Thread Information Block access.
4735
4736 On Windows targets, GDB now supports displaying the Windows Thread
4737 Information Block (TIB) structure. This structure is visible either
4738 by using the new command `info w32 thread-information-block' or, by
4739 dereferencing the new convenience variable named `$_tlb', a
4740 thread-specific pointer to the TIB. This feature is also supported
4741 when remote debugging using GDBserver.
4742
0fb4aa4b
PA
4743* Static tracepoints
4744
4745 Static tracepoints are calls in the user program into a tracing
4746 library. One such library is a port of the LTTng kernel tracer to
4747 userspace --- UST (LTTng Userspace Tracer, http://lttng.org/ust).
4748 When debugging with GDBserver, GDB now supports combining the GDB
4749 tracepoint machinery with such libraries. For example: the user can
4750 use GDB to probe a static tracepoint marker (a call from the user
4751 program into the tracing library) with the new "strace" command (see
4752 "New commands" below). This creates a "static tracepoint" in the
4753 breakpoint list, that can be manipulated with the same feature set
4754 as fast and regular tracepoints. E.g., collect registers, local and
4755 global variables, collect trace state variables, and define
4756 tracepoint conditions. In addition, the user can collect extra
4757 static tracepoint marker specific data, by collecting the new
4758 $_sdata internal variable. When analyzing the trace buffer, you can
4759 inspect $_sdata like any other variable available to GDB. For more
4760 information, see the "Tracepoints" chapter in GDB user manual. New
4761 remote packets have been defined to support static tracepoints, see
4762 the "New remote packets" section below.
4763
ca11e899
SS
4764* Better reconstruction of tracepoints after disconnected tracing
4765
4766 GDB will attempt to download the original source form of tracepoint
4767 definitions when starting a trace run, and then will upload these
4768 upon reconnection to the target, resulting in a more accurate
4769 reconstruction of the tracepoints that are in use on the target.
4770
4771* Observer mode
4772
4773 You can now exercise direct control over the ways that GDB can
4774 affect your program. For instance, you can disallow the setting of
4775 breakpoints, so that the program can run continuously (assuming
4776 non-stop mode). In addition, the "observer" variable is available
4777 to switch all of the different controls; in observer mode, GDB
4778 cannot affect the target's behavior at all, which is useful for
4779 tasks like diagnosing live systems in the field.
4780
4781* The new convenience variable $_thread holds the number of the
4782 current thread.
4783
711e434b
PM
4784* New remote packets
4785
4786qGetTIBAddr
4787
4788 Return the address of the Windows Thread Information Block of a given thread.
4789
dde08ee1
PA
4790qRelocInsn
4791
4792 In response to several of the tracepoint packets, the target may now
4793 also respond with a number of intermediate `qRelocInsn' request
4794 packets before the final result packet, to have GDB handle
4795 relocating an instruction to execute at a different address. This
4796 is particularly useful for stubs that support fast tracepoints. GDB
4797 reports support for this feature in the qSupported packet.
4798
0fb4aa4b
PA
4799qTfSTM, qTsSTM
4800
4801 List static tracepoint markers in the target program.
4802
4803qTSTMat
4804
4805 List static tracepoint markers at a given address in the target
4806 program.
4807
4808qXfer:statictrace:read
4809
4810 Read the static trace data collected (by a `collect $_sdata'
4811 tracepoint action). The remote stub reports support for this packet
4812 to gdb's qSupported query.
4813
ca11e899
SS
4814QAllow
4815
4816 Send the current settings of GDB's permission flags.
4817
4818QTDPsrc
4819
4820 Send part of the source (textual) form of a tracepoint definition,
4821 which includes location, conditional, and action list.
4822
3f7b2faa
DE
4823* The source command now accepts a -s option to force searching for the
4824 script in the source search path even if the script name specifies
4825 a directory.
4826
d337e9f0
PA
4827* New features in the GDB remote stub, GDBserver
4828
0fb4aa4b
PA
4829 - GDBserver now support tracepoints (including fast tracepoints, and
4830 static tracepoints). The feature is currently supported by the
4831 i386-linux and amd64-linux builds. See the "Tracepoints support
4832 in gdbserver" section in the manual for more information.
4833
4834 GDBserver JIT compiles the tracepoint's conditional agent
4835 expression bytecode into native code whenever possible for low
4836 overhead dynamic tracepoints conditionals. For such tracepoints,
4837 an expression that examines program state is evaluated when the
4838 tracepoint is reached, in order to determine whether to capture
4839 trace data. If the condition is simple and false, processing the
4840 tracepoint finishes very quickly and no data is gathered.
4841
4842 GDBserver interfaces with the UST (LTTng Userspace Tracer) library
4843 for static tracepoints support.
d337e9f0 4844
c24d0242
PM
4845 - GDBserver now supports x86_64 Windows 64-bit debugging.
4846
c8d5aac9
L
4847* GDB now sends xmlRegisters= in qSupported packet to indicate that
4848 it understands register description.
4849
7c953934
TT
4850* The --batch flag now disables pagination and queries.
4851
8685c86f
L
4852* X86 general purpose registers
4853
4854 GDB now supports reading/writing byte, word and double-word x86
4855 general purpose registers directly. This means you can use, say,
4856 $ah or $ax to refer, respectively, to the byte register AH and
4857 16-bit word register AX that are actually portions of the 32-bit
4858 register EAX or 64-bit register RAX.
4859
95a42b64 4860* The `commands' command now accepts a range of breakpoints to modify.
86b17b60
PA
4861 A plain `commands' following a command that creates multiple
4862 breakpoints affects all the breakpoints set by that command. This
4863 applies to breakpoints set by `rbreak', and also applies when a
4864 single `break' command creates multiple breakpoints (e.g.,
4865 breakpoints on overloaded c++ functions).
95a42b64 4866
8bd10a10
CM
4867* The `rbreak' command now accepts a filename specification as part of
4868 its argument, limiting the functions selected by the regex to those
4869 in the specified file.
4870
ab38a727
PA
4871* Support for remote debugging Windows and SymbianOS shared libraries
4872 from Unix hosts has been improved. Non Windows GDB builds now can
4873 understand target reported file names that follow MS-DOS based file
4874 system semantics, such as file names that include drive letters and
4875 use the backslash character as directory separator. This makes it
4876 possible to transparently use the "set sysroot" and "set
4877 solib-search-path" on Unix hosts to point as host copies of the
4878 target's shared libraries. See the new command "set
4879 target-file-system-kind" described below, and the "Commands to
4880 specify files" section in the user manual for more information.
4881
6149aea9
PA
4882* New commands
4883
f1421989
HZ
4884eval template, expressions...
4885 Convert the values of one or more expressions under the control
4886 of the string template to a command line, and call it.
4887
ab38a727
PA
4888set target-file-system-kind unix|dos-based|auto
4889show target-file-system-kind
4890 Set or show the assumed file system kind for target reported file
4891 names.
4892
6149aea9
PA
4893save breakpoints <filename>
4894 Save all current breakpoint definitions to a file suitable for use
4895 in a later debugging session. To read the saved breakpoint
4896 definitions, use the `source' command.
4897
4898`save tracepoints' is a new alias for `save-tracepoints'. The latter
4899is now deprecated.
4900
0fb4aa4b
PA
4901info static-tracepoint-markers
4902 Display information about static tracepoint markers in the target.
4903
4904strace FN | FILE:LINE | *ADDR | -m MARKER_ID
4905 Define a static tracepoint by probing a marker at the given
4906 function, line, address, or marker ID.
4907
ca11e899
SS
4908set observer on|off
4909show observer
4910 Enable and disable observer mode.
4911
4912set may-write-registers on|off
4913set may-write-memory on|off
4914set may-insert-breakpoints on|off
4915set may-insert-tracepoints on|off
4916set may-insert-fast-tracepoints on|off
4917set may-interrupt on|off
4918 Set individual permissions for GDB effects on the target. Note that
4919 some of these settings can have undesirable or surprising
4920 consequences, particularly when changed in the middle of a session.
4921 For instance, disabling the writing of memory can prevent
4922 breakpoints from being inserted, cause single-stepping to fail, or
4923 even crash your program, if you disable after breakpoints have been
4924 inserted. However, GDB should not crash.
4925
4926set record memory-query on|off
4927show record memory-query
4928 Control whether to stop the inferior if memory changes caused
4929 by an instruction cannot be recorded.
4930
53a71c06
CR
4931* Changed commands
4932
4933disassemble
4934 The disassemble command now supports "start,+length" form of two arguments.
4935
f3e9a817
PM
4936* Python scripting
4937
9279c692
JB
4938** GDB now provides a new directory location, called the python directory,
4939 where Python scripts written for GDB can be installed. The location
4940 of that directory is <data-directory>/python, where <data-directory>
4941 is the GDB data directory. For more details, see section `Scripting
4942 GDB using Python' in the manual.
4943
adc36818 4944** The GDB Python API now has access to breakpoints, symbols, symbol
595939de
PM
4945 tables, program spaces, inferiors, threads and frame's code blocks.
4946 Additionally, GDB Parameters can now be created from the API, and
4947 manipulated via set/show in the CLI.
f870a310 4948
fa33c3cd 4949** New functions gdb.target_charset, gdb.target_wide_charset,
07ca107c
DE
4950 gdb.progspaces, gdb.current_progspace, and gdb.string_to_argv.
4951
4952** New exception gdb.GdbError.
fa33c3cd
DE
4953
4954** Pretty-printers are now also looked up in the current program space.
f3e9a817 4955
967cf477
DE
4956** Pretty-printers can now be individually enabled and disabled.
4957
8a1ea21f
DE
4958** GDB now looks for names of Python scripts to auto-load in a
4959 special section named `.debug_gdb_scripts', in addition to looking
4960 for a OBJFILE-gdb.py script when OBJFILE is read by the debugger.
4961
a7bdde9e
VP
4962* Tracepoint actions were unified with breakpoint commands. In particular,
4963there are no longer differences in "info break" output for breakpoints and
4964tracepoints and the "commands" command can be used for both tracepoints and
4965regular breakpoints.
4966
05071a4d
PA
4967* New targets
4968
4969ARM Symbian arm*-*-symbianelf*
4970
6aecb9c2
JB
4971* D language support.
4972 GDB now supports debugging programs written in the D programming
4973 language.
4974
431e49aa
TJB
4975* GDB now supports the extended ptrace interface for PowerPC which is
4976 available since Linux kernel version 2.6.34. This automatically enables
4977 any hardware breakpoints and additional hardware watchpoints available in
4978 the processor. The old ptrace interface exposes just one hardware
4979 watchpoint and no hardware breakpoints.
4980
4981* GDB is now able to use the Data Value Compare (DVC) register available on
4982 embedded PowerPC processors to implement in hardware simple watchpoint
4983 conditions of the form:
4984
4985 watch ADDRESS|VARIABLE if ADDRESS|VARIABLE == CONSTANT EXPRESSION
4986
4987 This works in native GDB running on Linux kernels with the extended ptrace
4988 interface mentioned above.
4989
bfbf3774 4990*** Changes in GDB 7.1
abc7453d 4991
4eef138c
TT
4992* C++ Improvements
4993
4994 ** Namespace Support
71dee663
SW
4995
4996 GDB now supports importing of namespaces in C++. This enables the
4997 user to inspect variables from imported namespaces. Support for
4998 namepace aliasing has also been added. So, if a namespace is
4999 aliased in the current scope (e.g. namepace C=A; ) the user can
5000 print variables using the alias (e.g. (gdb) print C::x).
5001
4eef138c
TT
5002 ** Bug Fixes
5003
5004 All known bugs relating to the printing of virtual base class were
5005 fixed. It is now possible to call overloaded static methods using a
5006 qualified name.
5007
5008 ** Cast Operators
5009
5010 The C++ cast operators static_cast<>, dynamic_cast<>, const_cast<>,
5011 and reinterpret_cast<> are now handled by the C++ expression parser.
5012
2d1c1221
ME
5013* New targets
5014
5015Xilinx MicroBlaze microblaze-*-*
34207b9e 5016Renesas RX rx-*-elf
2d1c1221
ME
5017
5018* New Simulators
5019
5020Xilinx MicroBlaze microblaze
34207b9e 5021Renesas RX rx
2d1c1221 5022
6c95b8df
PA
5023* Multi-program debugging.
5024
5025 GDB now has support for multi-program (a.k.a. multi-executable or
5026 multi-exec) debugging. This allows for debugging multiple inferiors
5027 simultaneously each running a different program under the same GDB
5028 session. See "Debugging Multiple Inferiors and Programs" in the
5029 manual for more information. This implied some user visible changes
5030 in the multi-inferior support. For example, "info inferiors" now
5031 lists inferiors that are not running yet or that have exited
5032 already. See also "New commands" and "New options" below.
5033
d5551862
SS
5034* New tracing features
5035
5036 GDB's tracepoint facility now includes several new features:
5037
5038 ** Trace state variables
f61e138d
SS
5039
5040 GDB tracepoints now include support for trace state variables, which
5041 are variables managed by the target agent during a tracing
5042 experiment. They are useful for tracepoints that trigger each
5043 other, so for instance one tracepoint can count hits in a variable,
5044 and then a second tracepoint has a condition that is true when the
5045 count reaches a particular value. Trace state variables share the
5046 $-syntax of GDB convenience variables, and can appear in both
5047 tracepoint actions and condition expressions. Use the "tvariable"
5048 command to create, and "info tvariables" to view; see "Trace State
5049 Variables" in the manual for more detail.
7a697b8d 5050
d5551862 5051 ** Fast tracepoints
7a697b8d
SS
5052
5053 GDB now includes an option for defining fast tracepoints, which
5054 targets may implement more efficiently, such as by installing a jump
5055 into the target agent rather than a trap instruction. The resulting
5056 speedup can be by two orders of magnitude or more, although the
5057 tradeoff is that some program locations on some target architectures
5058 might not allow fast tracepoint installation, for instance if the
5059 instruction to be replaced is shorter than the jump. To request a
5060 fast tracepoint, use the "ftrace" command, with syntax identical to
5061 the regular trace command.
5062
d5551862
SS
5063 ** Disconnected tracing
5064
5065 It is now possible to detach GDB from the target while it is running
5066 a trace experiment, then reconnect later to see how the experiment
5067 is going. In addition, a new variable disconnected-tracing lets you
5068 tell the target agent whether to continue running a trace if the
5069 connection is lost unexpectedly.
5070
00bf0b85
SS
5071 ** Trace files
5072
5073 GDB now has the ability to save the trace buffer into a file, and
5074 then use that file as a target, similarly to you can do with
5075 corefiles. You can select trace frames, print data that was
5076 collected in them, and use tstatus to display the state of the
5077 tracing run at the moment that it was saved. To create a trace
5078 file, use "tsave <filename>", and to use it, do "target tfile
5079 <name>".
4daf5ac0
SS
5080
5081 ** Circular trace buffer
5082
5083 You can ask the target agent to handle the trace buffer as a
5084 circular buffer, discarding the oldest trace frames to make room for
5085 newer ones, by setting circular-trace-buffer to on. This feature may
5086 not be available for all target agents.
5087
21a0512e
PP
5088* Changed commands
5089
5090disassemble
5091 The disassemble command, when invoked with two arguments, now requires
5092 the arguments to be comma-separated.
5093
0fe7935b
DJ
5094info variables
5095 The info variables command now displays variable definitions. Files
5096 which only declare a variable are not shown.
5097
fb2e7cb4
JB
5098source
5099 The source command is now capable of sourcing Python scripts.
5100 This feature is dependent on the debugger being build with Python
5101 support.
5102
5103 Related to this enhancement is also the introduction of a new command
5104 "set script-extension" (see below).
5105
6c95b8df
PA
5106* New commands (for set/show, see "New options" below)
5107
399cd161
MS
5108record save [<FILENAME>]
5109 Save a file (in core file format) containing the process record
5110 execution log for replay debugging at a later time.
5111
5112record restore <FILENAME>
5113 Restore the process record execution log that was saved at an
5114 earlier time, for replay debugging.
5115
6c95b8df
PA
5116add-inferior [-copies <N>] [-exec <FILENAME>]
5117 Add a new inferior.
5118
5119clone-inferior [-copies <N>] [ID]
5120 Make a new inferior ready to execute the same program another
5121 inferior has loaded.
5122
5123remove-inferior ID
5124 Remove an inferior.
5125
5126maint info program-spaces
5127 List the program spaces loaded into GDB.
5128
9a7071a8
JB
5129set remote interrupt-sequence [Ctrl-C | BREAK | BREAK-g]
5130show remote interrupt-sequence
5131 Allow the user to select one of ^C, a BREAK signal or BREAK-g
5132 as the sequence to the remote target in order to interrupt the execution.
5133 Ctrl-C is a default. Some system prefers BREAK which is high level of
5134 serial line for some certain time. Linux kernel prefers BREAK-g, a.k.a
5135 Magic SysRq g. It is BREAK signal and character 'g'.
5136
5137set remote interrupt-on-connect [on | off]
5138show remote interrupt-on-connect
5139 When interrupt-on-connect is ON, gdb sends interrupt-sequence to
5140 remote target when gdb connects to it. This is needed when you debug
5141 Linux kernel.
5142
5143set remotebreak [on | off]
5144show remotebreak
5145Deprecated. Use "set/show remote interrupt-sequence" instead.
5146
f61e138d
SS
5147tvariable $NAME [ = EXP ]
5148 Create or modify a trace state variable.
5149
5150info tvariables
5151 List trace state variables and their values.
5152
5153delete tvariable $NAME ...
5154 Delete one or more trace state variables.
5155
6da95a67
SS
5156teval EXPR, ...
5157 Evaluate the given expressions without collecting anything into the
5158 trace buffer. (Valid in tracepoint actions only.)
5159
7a697b8d
SS
5160ftrace FN / FILE:LINE / *ADDR
5161 Define a fast tracepoint at the given function, line, or address.
5162
b0f02ee9
JK
5163* New expression syntax
5164
5165 GDB now parses the 0b prefix of binary numbers the same way as GCC does.
5166 GDB now parses 0b101010 identically with 42.
5167
6c95b8df
PA
5168* New options
5169
5170set follow-exec-mode new|same
5171show follow-exec-mode
5172 Control whether GDB reuses the same inferior across an exec call or
5173 creates a new one. This is useful to be able to restart the old
5174 executable after the inferior having done an exec call.
5175
236f1d4d
SS
5176set default-collect EXPR, ...
5177show default-collect
5178 Define a list of expressions to be collected at each tracepoint.
5179 This is a useful way to ensure essential items are not overlooked,
5180 such as registers or a critical global variable.
5181
d5551862
SS
5182set disconnected-tracing
5183show disconnected-tracing
5184 If set to 1, the target is instructed to continue tracing if it
5185 loses its connection to GDB. If 0, the target is to stop tracing
5186 upon disconnection.
5187
4daf5ac0
SS
5188set circular-trace-buffer
5189show circular-trace-buffer
5190 If set to on, the target is instructed to use a circular trace buffer
5191 and discard the oldest trace frames instead of stopping the trace due
5192 to a full trace buffer. If set to off, the trace stops when the buffer
5193 fills up. Some targets may not support this.
5194
fb2e7cb4
JB
5195set script-extension off|soft|strict
5196show script-extension
5197 If set to "off", the debugger does not perform any script language
5198 recognition, and all sourced files are assumed to be GDB scripts.
5199 If set to "soft" (the default), files are sourced according to
5200 filename extension, falling back to GDB scripts if the first
5201 evaluation failed.
5202 If set to "strict", files are sourced according to filename extension.
5203
2b71fc8e
JB
5204set ada trust-PAD-over-XVS on|off
5205show ada trust-PAD-over-XVS
5206 If off, activate a workaround against a bug in the debugging information
5207 generated by the compiler for PAD types (see gcc/exp_dbug.ads in
5208 the GCC sources for more information about the GNAT encoding and
5209 PAD types in particular). It is always safe to set this option to
5210 off, but this introduces a slight performance penalty. The default
5211 is on.
5212
de2e5182
TT
5213* Python API Improvements
5214
5215 ** GDB provides the new class gdb.LazyString. This is useful in
5216 some pretty-printing cases. The new method gdb.Value.lazy_string
5217 provides a simple way to create objects of this type.
5218
5219 ** The fields returned by gdb.Type.fields now have an
5220 `is_base_class' attribute.
5221
5222 ** The new method gdb.Type.range returns the range of an array type.
5223
5224 ** The new method gdb.parse_and_eval can be used to parse and
5225 evaluate an expression.
5226
f61e138d
SS
5227* New remote packets
5228
5229QTDV
5230 Define a trace state variable.
5231
5232qTV
5233 Get the current value of a trace state variable.
5234
d5551862
SS
5235QTDisconnected
5236 Set desired tracing behavior upon disconnection.
5237
4daf5ac0
SS
5238QTBuffer:circular
5239 Set the trace buffer to be linear or circular.
5240
d5551862
SS
5241qTfP, qTsP
5242 Get data about the tracepoints currently in use.
5243
2d483d34
MS
5244* Bug fixes
5245
5246Process record now works correctly with hardware watchpoints.
5247
6e0e5977
JB
5248Multiple bug fixes have been made to the mips-irix port, making it
5249much more reliable. In particular:
5250 - Debugging threaded applications is now possible again. Previously,
5251 GDB would hang while starting the program, or while waiting for
5252 the program to stop at a breakpoint.
5253 - Attaching to a running process no longer hangs.
5254 - An error occurring while loading a core file has been fixed.
5255 - Changing the value of the PC register now works again. This fixes
5256 problems observed when using the "jump" command, or when calling
5257 a function from GDB, or even when assigning a new value to $pc.
5258 - With the "finish" and "return" commands, the return value for functions
5259 returning a small array is now correctly printed.
5260 - It is now possible to break on shared library code which gets executed
5261 during a shared library init phase (code executed while executing
5262 their .init section). Previously, the breakpoint would have no effect.
5263 - GDB is now able to backtrace through the signal handler for
5264 non-threaded programs.
5265
93c26624
JK
5266PIE (Position Independent Executable) programs debugging is now supported.
5267This includes debugging execution of PIC (Position Independent Code) shared
5268libraries although for that, it should be possible to run such libraries as an
5269executable program.
5270
abc7453d 5271*** Changes in GDB 7.0
75feb17d 5272
4efc6507
DE
5273* GDB now has an interface for JIT compilation. Applications that
5274dynamically generate code can create symbol files in memory and register
5275them with GDB. For users, the feature should work transparently, and
5276for JIT developers, the interface is documented in the GDB manual in the
5277"JIT Compilation Interface" chapter.
5278
782b2b07
SS
5279* Tracepoints may now be conditional. The syntax is as for
5280breakpoints; either an "if" clause appended to the "trace" command,
5281or the "condition" command is available. GDB sends the condition to
5282the target for evaluation using the same bytecode format as is used
5283for tracepoint actions.
5284
53a71c06
CR
5285* The disassemble command now supports: an optional /r modifier, print the
5286raw instructions in hex as well as in symbolic form, and an optional /m
5287modifier to print mixed source+assembly.
e6158f16 5288
e7a8dbfb
HZ
5289* Process record and replay
5290
5291 In a architecture environment that supports ``process record and
5292 replay'', ``process record and replay'' target can record a log of
5293 the process execution, and replay it with both forward and reverse
5294 execute commands.
5295
64644d9b
MS
5296* Reverse debugging: GDB now has new commands reverse-continue, reverse-
5297step, reverse-next, reverse-finish, reverse-stepi, reverse-nexti, and
5298set execution-direction {forward|reverse}, for targets that support
5299reverse execution.
5300
b9412953
DD
5301* GDB now supports hardware watchpoints on MIPS/Linux systems. This
5302feature is available with a native GDB running on kernel version
53032.6.28 or later.
5304
6c7a06a3
TT
5305* GDB now has support for multi-byte and wide character sets on the
5306target. Strings whose character type is wchar_t, char16_t, or
5307char32_t are now correctly printed. GDB supports wide- and unicode-
5308literals in C, that is, L'x', L"string", u'x', u"string", U'x', and
5309U"string" syntax. And, GDB allows the "%ls" and "%lc" formats in
5310`printf'. This feature requires iconv to work properly; if your
5311system does not have a working iconv, GDB can use GNU libiconv. See
5312the installation instructions for more information.
5313
f1838a98
UW
5314* GDB now supports automatic retrieval of shared library files from
5315remote targets. To use this feature, specify a system root that begins
5316with the `remote:' prefix, either via the `set sysroot' command or via
5317the `--with-sysroot' configure-time option.
5318
55333a84
DE
5319* "info sharedlibrary" now takes an optional regex of libraries to show,
5320and it now reports if a shared library has no debugging information.
5321
7f6a6314
PM
5322* Commands `set debug-file-directory', `set solib-search-path' and `set args'
5323now complete on file names.
5324
65d12d83
TT
5325* When completing in expressions, gdb will attempt to limit
5326completions to allowable structure or union fields, where appropriate.
5327For instance, consider:
5328
5329 # struct example { int f1; double f2; };
5330 # struct example variable;
5331 (gdb) p variable.
5332
5333If the user types TAB at the end of this command line, the available
5334completions will be "f1" and "f2".
5335
edb3359d
DJ
5336* Inlined functions are now supported. They show up in backtraces, and
5337the "step", "next", and "finish" commands handle them automatically.
5338
2fae03e8
TT
5339* GDB now supports the token-splicing (##) and stringification (#)
5340operators when expanding macros. It also supports variable-arity
5341macros.
5342
47a3467a 5343* GDB now supports inspecting extra signal information, exported by
58d6951d
DJ
5344the new $_siginfo convenience variable. The feature is currently
5345implemented on linux ARM, i386 and amd64.
5346
5347* GDB can now display the VFP floating point registers and NEON vector
5348registers on ARM targets. Both ARM GNU/Linux native GDB and gdbserver
5349can provide these registers (requires Linux 2.6.30 or later). Remote
5350and simulator targets may also provide them.
47a3467a 5351
08388c79
DE
5352* New remote packets
5353
5354qSearch:memory:
5355 Search memory for a sequence of bytes.
5356
a6f3e723
SL
5357QStartNoAckMode
5358 Turn off `+'/`-' protocol acknowledgments to permit more efficient
5359 operation over reliable transport links. Use of this packet is
5360 controlled by the `set remote noack-packet' command.
5361
d7713ae0
EZ
5362vKill
5363 Kill the process with the specified process ID. Use this in preference
5364 to `k' when multiprocess protocol extensions are supported.
5365
07e059b5
VP
5366qXfer:osdata:read
5367 Obtains additional operating system information
5368
47a3467a
PA
5369qXfer:siginfo:read
5370qXfer:siginfo:write
5371 Read or write additional signal information.
5372
060871df
PA
5373* Removed remote protocol undocumented extension
5374
5375 An undocumented extension to the remote protocol's `S' stop reply
82f06518 5376 packet that permitted the stub to pass a process id was removed.
060871df
PA
5377 Remote servers should use the `T' stop reply packet instead.
5378
c055b101 5379* GDB now supports multiple function calling conventions according to the
a0ef4274 5380DWARF-2 DW_AT_calling_convention function attribute.
c055b101
CV
5381
5382* The SH target utilizes the aforementioned change to distinguish between gcc
a0ef4274
DJ
5383and Renesas calling convention. It also adds the new CLI commands
5384`set/show sh calling-convention'.
c055b101 5385
31fffb02
CS
5386* GDB can now read compressed debug sections, as produced by GNU gold
5387with the --compress-debug-sections=zlib flag.
5388
88d8a8e0
JB
5389* 64-bit core files are now supported on AIX.
5390
7f99b190
JB
5391* Thread switching is now supported on Tru64.
5392
ccd213ac
DJ
5393* Watchpoints can now be set on unreadable memory locations, e.g. addresses
5394which will be allocated using malloc later in program execution.
5395
82f06518 5396* The qXfer:libraries:read remote protocol packet now allows passing a
31fffb02 5397list of section offsets.
1fddbabb 5398
a0ef4274
DJ
5399* On GNU/Linux, GDB can now attach to stopped processes. Several race
5400conditions handling signals delivered during attach or thread creation
5401have also been fixed.
5402
bfb8797a 5403* GDB now supports the use of DWARF boolean types for Ada's type Boolean.
158c7665
PH
5404From the user's standpoint, all unqualified instances of True and False
5405are treated as the standard definitions, regardless of context.
bfb8797a 5406
71c25dea
TT
5407* GDB now parses C++ symbol and type names more flexibly. For
5408example, given:
5409
5410 template<typename T> class C { };
5411 C<char const *> c;
5412
5413GDB will now correctly handle all of:
5414
5415 ptype C<char const *>
5416 ptype C<char const*>
5417 ptype C<const char *>
5418 ptype C<const char*>
5419
ccd213ac
DJ
5420* New features in the GDB remote stub, gdbserver
5421
5422 - The "--wrapper" command-line argument tells gdbserver to use a
5423 wrapper program to launch programs for debugging.
5424
7ae0e2a2
UW
5425 - On PowerPC and S/390 targets, it is now possible to use a single
5426 gdbserver executable to debug both 32-bit and 64-bit programs.
5427 (This requires gdbserver itself to be built as a 64-bit executable.)
5428
a6f3e723
SL
5429 - gdbserver uses the new noack protocol mode for TCP connections to
5430 reduce communications latency, if also supported and enabled in GDB.
5431
da8bd9a3
DJ
5432 - Support for the sparc64-linux-gnu target is now included in
5433 gdbserver.
5434
d70e31dd
DE
5435 - The amd64-linux build of gdbserver now supports debugging both
5436 32-bit and 64-bit programs.
5437
5438 - The i386-linux, amd64-linux, and i386-win32 builds of gdbserver
5439 now support hardware watchpoints, and will use them automatically
5440 as appropriate.
5441
d57a3c85
TJB
5442* Python scripting
5443
5444 GDB now has support for scripting using Python. Whether this is
5445 available is determined at configure time.
5446
d8906c6f
TJB
5447 New GDB commands can now be written in Python.
5448
aadc346a
JB
5449* Ada tasking support
5450
5451 Ada tasks can now be inspected in GDB. The following commands have
5452 been introduced:
5453
5454 info tasks
5455 Print the list of Ada tasks.
5456 info task N
5457 Print detailed information about task number N.
5458 task
5459 Print the task number of the current task.
5460 task N
5461 Switch the context of debugging to task number N.
5462
adb483fe
DJ
5463* Support for user-defined prefixed commands. The "define" command can
5464add new commands to existing prefixes, e.g. "target".
5465
2277426b
PA
5466* Multi-inferior, multi-process debugging.
5467
5468 GDB now has generalized support for multi-inferior debugging. See
5469 "Debugging Multiple Inferiors" in the manual for more information.
5470 Although availability still depends on target support, the command
5471 set is more uniform now. The GNU/Linux specific multi-forks support
5472 has been migrated to this new framework. This implied some user
5473 visible changes; see "New commands" and also "Removed commands"
5474 below.
5475
08d16641
PA
5476* Target descriptions can now describe the target OS ABI. See the
5477"Target Description Format" section in the user manual for more
5478information.
5479
e35359c5
UW
5480* Target descriptions can now describe "compatible" architectures
5481to indicate that the target can execute applications for a different
5482architecture in addition to those for the main target architecture.
5483See the "Target Description Format" section in the user manual for
5484more information.
5485
85e747d2
UW
5486* Multi-architecture debugging.
5487
5488 GDB now includes general supports for debugging applications on
5489 hybrid systems that use more than one single processor architecture
5490 at the same time. Each such hybrid architecture still requires
5491 specific support to be added. The only hybrid architecture supported
5492 in this version of GDB is the Cell Broadband Engine.
5493
5494* GDB now supports integrated debugging of Cell/B.E. applications that
5495use both the PPU and SPU architectures. To enable support for hybrid
5496Cell/B.E. debugging, you need to configure GDB to support both the
5497powerpc-linux or powerpc64-linux and the spu-elf targets, using the
5498--enable-targets configure option.
5499
11ade57a
PA
5500* Non-stop mode debugging.
5501
5502 For some targets, GDB now supports an optional mode of operation in
5503 which you can examine stopped threads while other threads continue
5504 to execute freely. This is referred to as non-stop mode, with the
5505 old mode referred to as all-stop mode. See the "Non-Stop Mode"
5506 section in the user manual for more information.
5507
5508 To be able to support remote non-stop debugging, a remote stub needs
5509 to implement the non-stop mode remote protocol extensions, as
5510 described in the "Remote Non-Stop" section of the user manual. The
5511 GDB remote stub, gdbserver, has been adjusted to support these
5512 extensions on linux targets.
5513
d7713ae0 5514* New commands (for set/show, see "New options" below)
75feb17d 5515
a96d9b2e
SDJ
5516catch syscall [NAME(S) | NUMBER(S)]
5517 Catch system calls. Arguments, which should be names of system
5518 calls or their numbers, mean catch only those syscalls. Without
5519 arguments, every syscall will be caught. When the inferior issues
5520 any of the specified syscalls, GDB will stop and announce the system
5521 call, both when it is called and when its call returns. This
5522 feature is currently available with a native GDB running on the
5523 Linux Kernel, under the following architectures: x86, x86_64,
5524 PowerPC and PowerPC64.
5525
08388c79
DE
5526find [/size-char] [/max-count] start-address, end-address|+search-space-size,
5527 val1 [, val2, ...]
5528 Search memory for a sequence of bytes.
5529
d57a3c85
TJB
5530maint set python print-stack
5531maint show python print-stack
5532 Show a stack trace when an error is encountered in a Python script.
5533
5534python [CODE]
5535 Invoke CODE by passing it to the Python interpreter.
5536
d7713ae0
EZ
5537macro define
5538macro list
5539macro undef
5540 These allow macros to be defined, undefined, and listed
5541 interactively.
5542
5543info os processes
5544 Show operating system information about processes.
5545
2277426b
PA
5546info inferiors
5547 List the inferiors currently under GDB's control.
5548
5549inferior NUM
5550 Switch focus to inferior number NUM.
5551
5552detach inferior NUM
5553 Detach from inferior number NUM.
5554
5555kill inferior NUM
5556 Kill inferior number NUM.
5557
d7713ae0
EZ
5558* New options
5559
3285f3fe
UW
5560set spu stop-on-load
5561show spu stop-on-load
5562 Control whether to stop for new SPE threads during Cell/B.E. debugging.
5563
ff1a52c6
UW
5564set spu auto-flush-cache
5565show spu auto-flush-cache
5566 Control whether to automatically flush the software-managed cache
5567 during Cell/B.E. debugging.
5568
d7713ae0
EZ
5569set sh calling-convention
5570show sh calling-convention
5571 Control the calling convention used when calling SH target functions.
5572
e0a3ce09 5573set debug timestamp
75feb17d 5574show debug timestamp
d7713ae0
EZ
5575 Control display of timestamps with GDB debugging output.
5576
5577set disassemble-next-line
5578show disassemble-next-line
5579 Control display of disassembled source lines or instructions when
5580 the debuggee stops.
5581
5582set remote noack-packet
5583show remote noack-packet
5584 Set/show the use of remote protocol QStartNoAckMode packet. See above
5585 under "New remote packets."
5586
5587set remote query-attached-packet
5588show remote query-attached-packet
5589 Control use of remote protocol `qAttached' (query-attached) packet.
5590
5591set remote read-siginfo-object
5592show remote read-siginfo-object
5593 Control use of remote protocol `qXfer:siginfo:read' (read-siginfo-object)
5594 packet.
5595
5596set remote write-siginfo-object
5597show remote write-siginfo-object
5598 Control use of remote protocol `qXfer:siginfo:write' (write-siginfo-object)
5599 packet.
5600
40ab02ce
MS
5601set remote reverse-continue
5602show remote reverse-continue
5603 Control use of remote protocol 'bc' (reverse-continue) packet.
5604
5605set remote reverse-step
5606show remote reverse-step
5607 Control use of remote protocol 'bs' (reverse-step) packet.
5608
d7713ae0
EZ
5609set displaced-stepping
5610show displaced-stepping
5611 Control displaced stepping mode. Displaced stepping is a way to
5612 single-step over breakpoints without removing them from the debuggee.
5613 Also known as "out-of-line single-stepping".
5614
5615set debug displaced
5616show debug displaced
5617 Control display of debugging info for displaced stepping.
5618
5619maint set internal-error
5620maint show internal-error
5621 Control what GDB does when an internal error is detected.
5622
5623maint set internal-warning
5624maint show internal-warning
5625 Control what GDB does when an internal warning is detected.
75feb17d 5626
ccd213ac
DJ
5627set exec-wrapper
5628show exec-wrapper
5629unset exec-wrapper
5630 Use a wrapper program to launch programs for debugging.
fa4727a6 5631
aad4b048
JB
5632set multiple-symbols (all|ask|cancel)
5633show multiple-symbols
5634 The value of this variable can be changed to adjust the debugger behavior
5635 when an expression or a breakpoint location contains an ambiguous symbol
5636 name (an overloaded function name, for instance).
5637
74960c60
VP
5638set breakpoint always-inserted
5639show breakpoint always-inserted
5640 Keep breakpoints always inserted in the target, as opposed to inserting
5641 them when resuming the target, and removing them when the target stops.
5642 This option can improve debugger performance on slow remote targets.
5643
0428b8f5
DJ
5644set arm fallback-mode (arm|thumb|auto)
5645show arm fallback-mode
5646set arm force-mode (arm|thumb|auto)
5647show arm force-mode
5648 These commands control how ARM GDB determines whether instructions
5649 are ARM or Thumb. The default for both settings is auto, which uses
5650 the current CPSR value for instructions without symbols; previous
5651 versions of GDB behaved as if "set arm fallback-mode arm".
5652
ef273377
CL
5653set arm unwind-secure-frames
5654 Enable unwinding from Non-secure to Secure mode on Cortex-M with
5655 Security extension.
5656 This can trigger security exceptions when unwinding exception stacks.
5657
10568435
JK
5658set disable-randomization
5659show disable-randomization
5660 Standalone programs run with the virtual address space randomization enabled
5661 by default on some platforms. This option keeps the addresses stable across
5662 multiple debugging sessions.
5663
d7713ae0
EZ
5664set non-stop
5665show non-stop
5666 Control whether other threads are stopped or not when some thread hits
5667 a breakpoint.
5668
b3eb342c 5669set target-async
d7713ae0 5670show target-async
b3eb342c
VP
5671 Requests that asynchronous execution is enabled in the target, if available.
5672 In this case, it's possible to resume target in the background, and interact
5673 with GDB while the target is running. "show target-async" displays the
5674 current state of asynchronous execution of the target.
5675
6c7a06a3
TT
5676set target-wide-charset
5677show target-wide-charset
5678 The target-wide-charset is the name of the character set that GDB
5679 uses when printing characters whose type is wchar_t.
5680
84603566
SL
5681set tcp auto-retry (on|off)
5682show tcp auto-retry
5683set tcp connect-timeout
5684show tcp connect-timeout
5685 These commands allow GDB to retry failed TCP connections to a remote stub
5686 with a specified timeout period; this is useful if the stub is launched
5687 in parallel with GDB but may not be ready to accept connections immediately.
5688
17a37d48
PP
5689set libthread-db-search-path
5690show libthread-db-search-path
5691 Control list of directories which GDB will search for appropriate
5692 libthread_db.
5693
d4db2f36
PA
5694set schedule-multiple (on|off)
5695show schedule-multiple
5696 Allow GDB to resume all threads of all processes or only threads of
5697 the current process.
5698
4e5d721f
DE
5699set stack-cache
5700show stack-cache
5701 Use more aggressive caching for accesses to the stack. This improves
5702 performance of remote debugging (particularly backtraces) without
5703 affecting correctness.
5704
910c5da8
JB
5705set interactive-mode (on|off|auto)
5706show interactive-mode
5707 Control whether GDB runs in interactive mode (on) or not (off).
5708 When in interactive mode, GDB waits for the user to answer all
5709 queries. Otherwise, GDB does not wait and assumes the default
5710 answer. When set to auto (the default), GDB determines which
5711 mode to use based on the stdin settings.
5712
2277426b
PA
5713* Removed commands
5714
5715info forks
5716 For program forks, this is replaced by the new more generic `info
5717 inferiors' command. To list checkpoints, you can still use the
5718 `info checkpoints' command, which was an alias for the `info forks'
5719 command.
5720
5721fork NUM
5722 Replaced by the new `inferior' command. To switch between
5723 checkpoints, you can still use the `restart' command, which was an
5724 alias for the `fork' command.
5725
5726process PID
5727 This is removed, since some targets don't have a notion of
5728 processes. To switch between processes, you can still use the
5729 `inferior' command using GDB's own inferior number.
5730
5731delete fork NUM
5732 For program forks, this is replaced by the new more generic `kill
5733 inferior' command. To delete a checkpoint, you can still use the
5734 `delete checkpoint' command, which was an alias for the `delete
5735 fork' command.
5736
5737detach fork NUM
5738 For program forks, this is replaced by the new more generic `detach
5739 inferior' command. To detach a checkpoint, you can still use the
5740 `detach checkpoint' command, which was an alias for the `detach
5741 fork' command.
5742
a80b95ba
TG
5743* New native configurations
5744
5745x86/x86_64 Darwin i[34567]86-*-darwin*
5746
b8bfd3ed
JB
5747x86_64 MinGW x86_64-*-mingw*
5748
75a2d5e7
TT
5749* New targets
5750
c28c63d8 5751Lattice Mico32 lm32-*
75a2d5e7 5752x86 DICOS i[34567]86-*-dicos*
4c1d2973 5753x86_64 DICOS x86_64-*-dicos*
5f814c3b 5754S+core 3 score-*-*
75a2d5e7 5755
6de3146c
PA
5756* The GDB remote stub, gdbserver, now supports x86 Windows CE
5757 (mingw32ce) debugging.
5758
d5cbbe6e
JB
5759* Removed commands
5760
5761catch load
5762catch unload
5763 These commands were actually not implemented on any target.
5764
75feb17d 5765*** Changes in GDB 6.8
f9ed52be 5766
af5ca30d
NH
5767* New native configurations
5768
5769NetBSD/hppa hppa*-*netbsd*
94a0e877 5770Xtensa GNU/Linux xtensa*-*-linux*
af5ca30d
NH
5771
5772* New targets
5773
5774NetBSD/hppa hppa*-*-netbsd*
82f06518 5775Xtensa GNU/Linux xtensa*-*-linux*
af5ca30d 5776
7a404eba
PA
5777* Change in command line behavior -- corefiles vs. process ids.
5778
5779 When the '-p NUMBER' or '--pid NUMBER' options are used, and
5780 attaching to process NUMBER fails, GDB no longer attempts to open a
5781 core file named NUMBER. Attaching to a program using the -c option
5782 is no longer supported. Instead, use the '-p' or '--pid' options.
5783
430ebac9
PA
5784* GDB can now be built as a native debugger for debugging Windows x86
5785(mingw32) Portable Executable (PE) programs.
5786
fe6fbf8b 5787* Pending breakpoints no longer change their number when their address
8d5f9c6f 5788is resolved.
fe6fbf8b
VP
5789
5790* GDB now supports breakpoints with multiple locations,
8d5f9c6f
DJ
5791including breakpoints on C++ constructors, inside C++ templates,
5792and in inlined functions.
fe6fbf8b 5793
10665d76
JB
5794* GDB's ability to debug optimized code has been improved. GDB more
5795accurately identifies function bodies and lexical blocks that occupy
5796more than one contiguous range of addresses.
5797
7cc46491
DJ
5798* Target descriptions can now describe registers for PowerPC.
5799
d71340b8
DJ
5800* The GDB remote stub, gdbserver, now supports the AltiVec and SPE
5801registers on PowerPC targets.
5802
523c4513
DJ
5803* The GDB remote stub, gdbserver, now supports thread debugging on GNU/Linux
5804targets even when the libthread_db library is not available.
5805
a6b151f1
DJ
5806* The GDB remote stub, gdbserver, now supports the new file transfer
5807commands (remote put, remote get, and remote delete).
5808
2d717e4f
DJ
5809* The GDB remote stub, gdbserver, now supports run and attach in
5810extended-remote mode.
5811
24a836bd 5812* hppa*64*-*-hpux11* target broken
d001be7a
DJ
5813The debugger is unable to start a program and fails with the following
5814error: "Error trying to get information about dynamic linker".
5815The gdb-6.7 release is also affected.
24a836bd 5816
d0c678e6
UW
5817* GDB now supports the --enable-targets= configure option to allow
5818building a single GDB executable that supports multiple remote
5819target architectures.
5820
d64a946d
TJB
5821* GDB now supports debugging C and C++ programs which use the
5822Decimal Floating Point extension. In addition, the PowerPC target
5823now has a set of pseudo-registers to inspect decimal float values
5824stored in two consecutive float registers.
5825
ee163bf5
VP
5826* The -break-insert MI command can optionally create pending
5827breakpoints now.
5828
b93b6ca7 5829* Improved support for debugging Ada
d001be7a
DJ
5830Many improvements to the Ada language support have been made. These
5831include:
b93b6ca7
JB
5832 - Better support for Ada2005 interface types
5833 - Improved handling of arrays and slices in general
5834 - Better support for Taft-amendment types
5835 - The '{type} ADDRESS' expression is now allowed on the left hand-side
5836 of an assignment
5837 - Improved command completion in Ada
5838 - Several bug fixes
5839
d001be7a
DJ
5840* GDB on GNU/Linux and HP/UX can now debug through "exec" of a new
5841process.
5842
a6b151f1
DJ
5843* New commands
5844
6d53d0af
JB
5845set print frame-arguments (all|scalars|none)
5846show print frame-arguments
5847 The value of this variable can be changed to control which argument
5848 values should be printed by the debugger when displaying a frame.
5849
a6b151f1
DJ
5850remote put
5851remote get
5852remote delete
5853 Transfer files to and from a remote target, and delete remote files.
5854
5855* New MI commands
5856
5857-target-file-put
5858-target-file-get
5859-target-file-delete
5860 Transfer files to and from a remote target, and delete remote files.
5861
5862* New remote packets
5863
5864vFile:open:
5865vFile:close:
5866vFile:pread:
5867vFile:pwrite:
5868vFile:unlink:
5869 Open, close, read, write, and delete files on the remote system.
d0c678e6 5870
2d717e4f
DJ
5871vAttach
5872 Attach to an existing process on the remote system, in extended-remote
5873 mode.
5874
5875vRun
5876 Run a new process on the remote system, in extended-remote mode.
5877
8d5f9c6f 5878*** Changes in GDB 6.7
6dd09645 5879
19d378fc
MS
5880* Resolved 101 resource leaks, null pointer dereferences, etc. in gdb,
5881bfd, libiberty and opcodes, as revealed by static analysis donated by
5882Coverity, Inc. (http://scan.coverity.com).
5883
3a40aaa0
UW
5884* When looking up multiply-defined global symbols, GDB will now prefer the
5885symbol definition in the current shared library if it was built using the
5886-Bsymbolic linker option.
5887
a6ec25f2
BW
5888* When the Text User Interface (TUI) is not configured, GDB will now
5889recognize the -tui command-line option and print a message that the TUI
5890is not supported.
5891
6dd09645
JB
5892* The GDB remote stub, gdbserver, now has lower overhead for high
5893frequency signals (e.g. SIGALRM) via the QPassSignals packet.
5894
c9bb8148
DJ
5895* GDB for MIPS targets now autodetects whether a remote target provides
589632-bit or 64-bit register values.
5897
0d5de010
DJ
5898* Support for C++ member pointers has been improved.
5899
23181151
DJ
5900* GDB now understands XML target descriptions, which specify the
5901target's overall architecture. GDB can read a description from
5902a local file or over the remote serial protocol.
5903
ea37ba09
DJ
5904* Vectors of single-byte data use a new integer type which is not
5905automatically displayed as character or string data.
5906
5907* The /s format now works with the print command. It displays
5908arrays of single-byte integers and pointers to single-byte integers
5909as strings.
e1f48ead 5910
123dc839
DJ
5911* Target descriptions can now describe target-specific registers,
5912for architectures which have implemented the support (currently
8d5f9c6f 5913only ARM, M68K, and MIPS).
123dc839 5914
05a4558a
DJ
5915* GDB and the GDB remote stub, gdbserver, now support the XScale
5916iWMMXt coprocessor.
fb1e4ffc 5917
7c963485
PA
5918* The GDB remote stub, gdbserver, has been updated to support
5919ARM Windows CE (mingw32ce) debugging, and GDB Windows CE support
5920has been rewritten to use the standard GDB remote protocol.
5921
b18be20d
DJ
5922* GDB can now step into C++ functions which are called through thunks.
5923
0ca420ce
UW
5924* GDB for the Cell/B.E. SPU now supports overlay debugging.
5925
31d99776
DJ
5926* The GDB remote protocol "qOffsets" packet can now honor ELF segment
5927layout. It also supports a TextSeg= and DataSeg= response when only
5928segment base addresses (rather than offsets) are available.
5929
a4642986
MR
5930* The /i format now outputs any trailing branch delay slot instructions
5931immediately following the last instruction within the count specified.
5932
cfa9d6d9
DJ
5933* The GDB remote protocol "T" stop reply packet now supports a
5934"library" response. Combined with the new "qXfer:libraries:read"
5935packet, this response allows GDB to debug shared libraries on targets
5936where the operating system manages the list of loaded libraries (e.g.
5937Windows and SymbianOS).
255e7678
DJ
5938
5939* The GDB remote stub, gdbserver, now supports dynamic link libraries
5940(DLLs) on Windows and Windows CE targets.
f5db8714
JK
5941
5942* GDB now supports a faster verification that a .debug file matches its binary
5943according to its build-id signature, if the signature is present.
cfa9d6d9 5944
c9bb8148
DJ
5945* New commands
5946
23776285
MR
5947set remoteflow
5948show remoteflow
5949 Enable or disable hardware flow control (RTS/CTS) on the serial port
5950 when debugging using remote targets.
5951
c9bb8148
DJ
5952set mem inaccessible-by-default
5953show mem inaccessible-by-default
5954 If the target supplies a memory map, for instance via the remote
5955 protocol's "qXfer:memory-map:read" packet, setting this variable
5956 prevents GDB from accessing memory outside the memory map. This
5957 is useful for targets with memory mapped registers or which react
5958 badly to accesses of unmapped address space.
5959
5960set breakpoint auto-hw
5961show breakpoint auto-hw
5962 If the target supplies a memory map, for instance via the remote
5963 protocol's "qXfer:memory-map:read" packet, setting this variable
5964 lets GDB use hardware breakpoints automatically for memory regions
5965 where it can not use software breakpoints. This covers both the
5966 "break" command and internal breakpoints used for other commands
5967 including "next" and "finish".
5968
0e420bd8
JB
5969catch exception
5970catch exception unhandled
5971 Stop the program execution when Ada exceptions are raised.
5972
5973catch assert
5974 Stop the program execution when an Ada assertion failed.
5975
f822c95b
DJ
5976set sysroot
5977show sysroot
5978 Set an alternate system root for target files. This is a more
5979 general version of "set solib-absolute-prefix", which is now
5980 an alias to "set sysroot".
5981
83cc5c53
UW
5982info spu
5983 Provide extended SPU facility status information. This set of
5984 commands is available only when debugging the Cell/B.E. SPU
5985 architecture.
5986
bd372731
MK
5987* New native configurations
5988
5989OpenBSD/sh sh*-*openbsd*
5990
23181151
DJ
5991set tdesc filename
5992unset tdesc filename
5993show tdesc filename
5994 Use the specified local file as an XML target description, and do
5995 not query the target for its built-in description.
5996
c9bb8148
DJ
5997* New targets
5998
54fe9172 5999OpenBSD/sh sh*-*-openbsd*
c9bb8148 6000MIPS64 GNU/Linux (gdbserver) mips64-linux-gnu
c077150c 6001Toshiba Media Processor mep-elf
c9bb8148 6002
6dd09645
JB
6003* New remote packets
6004
6005QPassSignals:
6006 Ignore the specified signals; pass them directly to the debugged program
6007 without stopping other threads or reporting them to GDB.
6008
23181151
DJ
6009qXfer:features:read:
6010 Read an XML target description from the target, which describes its
6011 features.
6dd09645 6012
83cc5c53
UW
6013qXfer:spu:read:
6014qXfer:spu:write:
6015 Read or write contents of an spufs file on the target system. These
6016 packets are available only on the Cell/B.E. SPU architecture.
6017
cfa9d6d9
DJ
6018qXfer:libraries:read:
6019 Report the loaded shared libraries. Combined with new "T" packet
6020 response, this packet allows GDB to debug shared libraries on
6021 targets where the operating system manages the list of loaded
6022 libraries (e.g. Windows and SymbianOS).
6023
483367ee
DJ
6024* Removed targets
6025
6026Support for these obsolete configurations has been removed.
6027
d08950c4
UW
6028alpha*-*-osf1*
6029alpha*-*-osf2*
7ce59000 6030d10v-*-*
483367ee
DJ
6031hppa*-*-hiux*
6032i[34567]86-ncr-*
6033i[34567]86-*-dgux*
6034i[34567]86-*-lynxos*
6035i[34567]86-*-netware*
6036i[34567]86-*-sco3.2v5*
6037i[34567]86-*-sco3.2v4*
6038i[34567]86-*-sco*
6039i[34567]86-*-sysv4.2*
6040i[34567]86-*-sysv4*
6041i[34567]86-*-sysv5*
6042i[34567]86-*-unixware2*
6043i[34567]86-*-unixware*
6044i[34567]86-*-sysv*
6045i[34567]86-*-isc*
6046m68*-cisco*-*
6047m68*-tandem-*
ad527d2e 6048mips*-*-pe
483367ee 6049rs6000-*-lynxos*
ad527d2e 6050sh*-*-pe
483367ee 6051
7ce59000
DJ
6052* Other removed features
6053
6054target abug
6055target cpu32bug
6056target est
6057target rom68k
6058
6059 Various m68k-only ROM monitors.
6060
ea35711c
DJ
6061target hms
6062target e7000
6063target sh3
6064target sh3e
6065
6066 Various Renesas ROM monitors and debugging interfaces for SH and
6067 H8/300.
6068
6069target ocd
6070
6071 Support for a Macraigor serial interface to on-chip debugging.
6072 GDB does not directly support the newer parallel or USB
6073 interfaces.
6074
7ce59000
DJ
6075DWARF 1 support
6076
6077 A debug information format. The predecessor to DWARF 2 and
6078 DWARF 3, which are still supported.
6079
54d61198
DJ
6080Support for the HP aCC compiler on HP-UX/PA-RISC
6081
6082 SOM-encapsulated symbolic debugging information, automatic
6083 invocation of pxdb, and the aCC custom C++ ABI. This does not
6084 affect HP-UX for Itanium or GCC for HP-UX/PA-RISC. Code compiled
6085 with aCC can still be debugged on an assembly level.
6086
ea35711c
DJ
6087MIPS ".pdr" sections
6088
6089 A MIPS-specific format used to describe stack frame layout
6090 in debugging information.
6091
6092Scheme support
6093
6094 GDB could work with an older version of Guile to debug
6095 the interpreter and Scheme programs running in it.
6096
1a69e1e4
DJ
6097set mips stack-arg-size
6098set mips saved-gpreg-size
6099
6100 Use "set mips abi" to control parameter passing for MIPS.
6101
6dd09645 6102*** Changes in GDB 6.6
e374b601 6103
ca3bf3bd
DJ
6104* New targets
6105
6106Xtensa xtensa-elf
9c309e77 6107Cell Broadband Engine SPU spu-elf
ca3bf3bd 6108
6aec2e11
DJ
6109* GDB can now be configured as a cross-debugger targeting native Windows
6110(mingw32) or Cygwin. It can communicate with a remote debugging stub
6111running on a Windows system over TCP/IP to debug Windows programs.
6112
6113* The GDB remote stub, gdbserver, has been updated to support Windows and
6114Cygwin debugging. Both single-threaded and multi-threaded programs are
6115supported.
6116
17218d91
DJ
6117* The "set trust-readonly-sections" command works again. This command was
6118broken in GDB 6.3, 6.4, and 6.5.
6119
9ebce043
DJ
6120* The "load" command now supports writing to flash memory, if the remote
6121stub provides the required support.
6122
7d3d3ece
DJ
6123* Support for GNU/Linux Thread Local Storage (TLS, per-thread variables) no
6124longer requires symbolic debug information (e.g. DWARF-2).
6125
4f8253f3
JB
6126* New commands
6127
6128set substitute-path
6129unset substitute-path
6130show substitute-path
6131 Manage a list of substitution rules that GDB uses to rewrite the name
6132 of the directories where the sources are located. This can be useful
6133 for instance when the sources were moved to a different location
6134 between compilation and debugging.
6135
9fa66fd7
AS
6136set trace-commands
6137show trace-commands
6138 Print each CLI command as it is executed. Each command is prefixed with
6139 a number of `+' symbols representing the nesting depth.
6140 The source command now has a `-v' option to enable the same feature.
6141
1f5befc1
DJ
6142* REMOVED features
6143
6144The ARM Demon monitor support (RDP protocol, "target rdp").
6145
2ec3381a
DJ
6146Kernel Object Display, an embedded debugging feature which only worked with
6147an obsolete version of Cisco IOS.
6148
3d00d119
DJ
6149The 'set download-write-size' and 'show download-write-size' commands.
6150
be2a5f71
DJ
6151* New remote packets
6152
6153qSupported:
6154 Tell a stub about GDB client features, and request remote target features.
6155 The first feature implemented is PacketSize, which allows the target to
6156 specify the size of packets it can handle - to minimize the number of
6157 packets required and improve performance when connected to a remote
6158 target.
6159
0876f84a
DJ
6160qXfer:auxv:read:
6161 Fetch an OS auxilliary vector from the remote stub. This packet is a
6162 more efficient replacement for qPart:auxv:read.
6163
9ebce043
DJ
6164qXfer:memory-map:read:
6165 Fetch a memory map from the remote stub, including information about
6166 RAM, ROM, and flash memory devices.
6167
6168vFlashErase:
6169vFlashWrite:
6170vFlashDone:
6171 Erase and program a flash memory device.
6172
0876f84a
DJ
6173* Removed remote packets
6174
6175qPart:auxv:read:
6176 This packet has been replaced by qXfer:auxv:read. Only GDB 6.4 and 6.5
6177 used it, and only gdbserver implemented it.
6178
e374b601 6179*** Changes in GDB 6.5
53e5f3cf 6180
96309189
MS
6181* New targets
6182
6183Renesas M32C/M16C m32c-elf
6184
6185Morpho Technologies ms1 ms1-elf
6186
53e5f3cf
AS
6187* New commands
6188
6189init-if-undefined Initialize a convenience variable, but
6190 only if it doesn't already have a value.
6191
ac264b3b
MS
6192The following commands are presently only implemented for native GNU/Linux:
6193
6194checkpoint Save a snapshot of the program state.
6195
6196restart <n> Return the program state to a
6197 previously saved state.
6198
6199info checkpoints List currently saved checkpoints.
6200
6201delete-checkpoint <n> Delete a previously saved checkpoint.
6202
6203set|show detach-on-fork Tell gdb whether to detach from a newly
6204 forked process, or to keep debugging it.
6205
6206info forks List forks of the user program that
6207 are available to be debugged.
6208
6209fork <n> Switch to debugging one of several
6210 forks of the user program that are
6211 available to be debugged.
6212
6213delete-fork <n> Delete a fork from the list of forks
6214 that are available to be debugged (and
6215 kill the forked process).
6216
6217detach-fork <n> Delete a fork from the list of forks
6218 that are available to be debugged (and
6219 allow the process to continue).
6220
3950dc3f
NS
6221* New architecture
6222
6223Morpho Technologies ms2 ms1-elf
6224
0ea3f30e
DJ
6225* Improved Windows host support
6226
6227GDB now builds as a cross debugger hosted on i686-mingw32, including
6228native console support, and remote communications using either
6229network sockets or serial ports.
6230
f79daebb
GM
6231* Improved Modula-2 language support
6232
6233GDB can now print most types in the Modula-2 syntax. This includes:
6234basic types, set types, record types, enumerated types, range types,
6235pointer types and ARRAY types. Procedure var parameters are correctly
6236printed and hexadecimal addresses and character constants are also
6237written in the Modula-2 syntax. Best results can be obtained by using
6238GNU Modula-2 together with the -gdwarf-2 command line option.
6239
acab6ab2
MM
6240* REMOVED features
6241
6242The ARM rdi-share module.
6243
f4267320
DJ
6244The Netware NLM debug server.
6245
53e5f3cf 6246*** Changes in GDB 6.4
156a53ca 6247
e0ecbda1
MK
6248* New native configurations
6249
02a677ac 6250OpenBSD/arm arm*-*-openbsd*
e0ecbda1
MK
6251OpenBSD/mips64 mips64-*-openbsd*
6252
d64a6579
KB
6253* New targets
6254
6255Morpho Technologies ms1 ms1-elf
6256
b33a6190
AS
6257* New command line options
6258
6259--batch-silent As for --batch, but totally silent.
6260--return-child-result The debugger will exist with the same value
6261 the child (debugged) program exited with.
6262--eval-command COMMAND, -ex COMMAND
6263 Execute a single GDB CLI command. This may be
6264 specified multiple times and in conjunction
6265 with the --command (-x) option.
6266
11dced61
AC
6267* Deprecated commands removed
6268
6269The following commands, that were deprecated in 2000, have been
6270removed:
6271
6272 Command Replacement
6273 set|show arm disassembly-flavor set|show arm disassembler
6274 othernames set arm disassembler
6275 set|show remotedebug set|show debug remote
6276 set|show archdebug set|show debug arch
6277 set|show eventdebug set|show debug event
6278 regs info registers
6279
6fe85783
MK
6280* New BSD user-level threads support
6281
6282It is now possible to debug programs using the user-level threads
6283library on OpenBSD and FreeBSD. Currently supported (target)
6284configurations are:
6285
6286FreeBSD/amd64 x86_64-*-freebsd*
6287FreeBSD/i386 i386-*-freebsd*
6288OpenBSD/i386 i386-*-openbsd*
6289
6290Note that the new kernel threads libraries introduced in FreeBSD 5.x
6291are not yet supported.
6292
5260ca71
MS
6293* New support for Matsushita MN10300 w/sim added
6294(Work in progress). mn10300-elf.
6295
e84ecc99
AC
6296* REMOVED configurations and files
6297
6298VxWorks and the XDR protocol *-*-vxworks
9445aa30 6299Motorola MCORE mcore-*-*
9445aa30 6300National Semiconductor NS32000 ns32k-*-*
156a53ca 6301
31e35378
JB
6302* New "set print array-indexes" command
6303
6304After turning this setting "on", GDB prints the index of each element
6305when displaying arrays. The default is "off" to preserve the previous
6306behavior.
6307
e85e5c83
MK
6308* VAX floating point support
6309
6310GDB now supports the not-quite-ieee VAX F and D floating point formats.
6311
d91e9901
AS
6312* User-defined command support
6313
6314In addition to using $arg0..$arg9 for argument passing, it is now possible
6315to use $argc to determine now many arguments have been passed. See the
6316section on user-defined commands in the user manual for more information.
6317
f2cb65ca
MC
6318*** Changes in GDB 6.3:
6319
f47b1503
AS
6320* New command line option
6321
6322GDB now accepts -l followed by a number to set the timeout for remote
6323debugging.
6324
f2cb65ca
MC
6325* GDB works with GCC -feliminate-dwarf2-dups
6326
6327GDB now supports a more compact representation of DWARF-2 debug
6328information using DW_FORM_ref_addr references. These are produced
6329by GCC with the option -feliminate-dwarf2-dups and also by some
6330proprietary compilers. With GCC, you must use GCC 3.3.4 or later
6331to use -feliminate-dwarf2-dups.
860660cb 6332
d08c0230
AC
6333* Internationalization
6334
6335When supported by the host system, GDB will be built with
6336internationalization (libintl). The task of marking up the sources is
6337continued, we're looking forward to our first translation.
6338
117ea3cf
PH
6339* Ada
6340
6341Initial support for debugging programs compiled with the GNAT
6342implementation of the Ada programming language has been integrated
6343into GDB. In this release, support is limited to expression evaluation.
6344
d08c0230
AC
6345* New native configurations
6346
6347GNU/Linux/m32r m32r-*-linux-gnu
6348
6349* Remote 'p' packet
6350
6351GDB's remote protocol now includes support for the 'p' packet. This
6352packet is used to fetch individual registers from a remote inferior.
6353
6354* END-OF-LIFE registers[] compatibility module
6355
6356GDB's internal register infrastructure has been completely rewritten.
6357The new infrastructure making possible the implementation of key new
6358features including 32x64 (e.g., 64-bit amd64 GDB debugging a 32-bit
6359i386 application).
6360
09f2921c 6361GDB 6.3 will be the last release to include the registers[]
d08c0230
AC
6362compatibility module that allowed out-of-date configurations to
6363continue to work. This change directly impacts the following
6364configurations:
6365
6366hppa-*-hpux
6367ia64-*-aix
6368mips-*-irix*
6369*-*-lynx
6370mips-*-linux-gnu
6371sds protocol
6372xdr protocol
6373powerpc bdm protocol
6374
6375Unless there is activity to revive these configurations, they will be
6376made OBSOLETE in GDB 6.4, and REMOVED from GDB 6.5.
6377
6378* OBSOLETE configurations and files
6379
6380Configurations that have been declared obsolete in this release have
6381been commented out. Unless there is activity to revive these
6382configurations, the next release of GDB will have their sources
6383permanently REMOVED.
6384
6385h8300-*-*
6386mcore-*-*
6387mn10300-*-*
6388ns32k-*-*
6389sh64-*-*
6390v850-*-*
6391
ebb7c577
AC
6392*** Changes in GDB 6.2.1:
6393
6394* MIPS `break main; run' gave an heuristic-fence-post warning
6395
6396When attempting to run even a simple program, a warning about
6397heuristic-fence-post being hit would be reported. This problem has
6398been fixed.
6399
6400* MIPS IRIX 'long double' crashed GDB
6401
6402When examining a long double variable, GDB would get a segmentation
6403fault. The crash has been fixed (but GDB 6.2 cannot correctly examine
6404IRIX long double values).
6405
6406* VAX and "next"
6407
6408A bug in the VAX stack code was causing problems with the "next"
6409command. This problem has been fixed.
6410
860660cb 6411*** Changes in GDB 6.2:
faae5abe 6412
0dea2468
AC
6413* Fix for ``many threads''
6414
6415On GNU/Linux systems that use the NPTL threads library, a program
6416rapidly creating and deleting threads would confuse GDB leading to the
6417error message:
6418
6419 ptrace: No such process.
6420 thread_db_get_info: cannot get thread info: generic error
6421
6422This problem has been fixed.
6423
2c07db7a
AC
6424* "-async" and "-noasync" options removed.
6425
6426Support for the broken "-noasync" option has been removed (it caused
6427GDB to dump core).
6428
c23968a2
JB
6429* New ``start'' command.
6430
82f06518 6431This command runs the program until the beginning of the main procedure.
c23968a2 6432
71009278
MK
6433* New BSD Kernel Data Access Library (libkvm) interface
6434
6435Using ``target kvm'' it is now possible to debug kernel core dumps and
6436live kernel memory images on various FreeBSD, NetBSD and OpenBSD
6437platforms. Currently supported (native-only) configurations are:
6438
6439FreeBSD/amd64 x86_64-*-freebsd*
6440FreeBSD/i386 i?86-*-freebsd*
6441NetBSD/i386 i?86-*-netbsd*
6442NetBSD/m68k m68*-*-netbsd*
6443NetBSD/sparc sparc-*-netbsd*
6444OpenBSD/amd64 x86_64-*-openbsd*
6445OpenBSD/i386 i?86-*-openbsd*
6446OpenBSD/m68k m68*-openbsd*
6447OpenBSD/sparc sparc-*-openbsd*
6448
3c0b7db2
AC
6449* Signal trampoline code overhauled
6450
6451Many generic problems with GDB's signal handling code have been fixed.
6452These include: backtraces through non-contiguous stacks; recognition
6453of sa_sigaction signal trampolines; backtrace from a NULL pointer
6454call; backtrace through a signal trampoline; step into and out of
6455signal handlers; and single-stepping in the signal trampoline.
6456
73cc75f3
AC
6457Please note that kernel bugs are a limiting factor here. These
6458features have been shown to work on an s390 GNU/Linux system that
6459include a 2.6.8-rc1 kernel. Ref PR breakpoints/1702.
3c0b7db2 6460
7243600a
BF
6461* Cygwin support for DWARF 2 added.
6462
6f606e1c
MK
6463* New native configurations
6464
97dc871c 6465GNU/Linux/hppa hppa*-*-linux*
0e56aeaf 6466OpenBSD/hppa hppa*-*-openbsd*
bf2ca189
MK
6467OpenBSD/m68k m68*-*-openbsd*
6468OpenBSD/m88k m88*-*-openbsd*
d195bc9f 6469OpenBSD/powerpc powerpc-*-openbsd*
6f606e1c 6470NetBSD/vax vax-*-netbsd*
9f076e7a 6471OpenBSD/vax vax-*-openbsd*
6f606e1c 6472
a1b461bf
AC
6473* END-OF-LIFE frame compatibility module
6474
6475GDB's internal frame infrastructure has been completely rewritten.
6476The new infrastructure making it possible to support key new features
6477including DWARF 2 Call Frame Information. To aid in the task of
6478migrating old configurations to this new infrastructure, a
6479compatibility module, that allowed old configurations to continue to
6480work, was also included.
6481
6482GDB 6.2 will be the last release to include this frame compatibility
6483module. This change directly impacts the following configurations:
6484
6485h8300-*-*
6486mcore-*-*
6487mn10300-*-*
6488ns32k-*-*
6489sh64-*-*
6490v850-*-*
6491xstormy16-*-*
6492
6493Unless there is activity to revive these configurations, they will be
6494made OBSOLETE in GDB 6.3, and REMOVED from GDB 6.4.
6495
3c7012f5
AC
6496* REMOVED configurations and files
6497
6498Sun 3, running SunOS 3 m68*-*-sunos3*
6499Sun 3, running SunOS 4 m68*-*-sunos4*
6500Sun 2, running SunOS 3 m68000-*-sunos3*
6501Sun 2, running SunOS 4 m68000-*-sunos4*
6502Motorola 680x0 running LynxOS m68*-*-lynxos*
6503AT&T 3b1/Unix pc m68*-att-*
6504Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
6505decstation mips-dec-* mips-little-*
6506riscos mips-*-riscos* mips-*-sysv*
6507sonymips mips-sony-*
6508sysv mips*-*-sysv4* (IRIX 5/6 not included)
6509
e5fe55f7
AC
6510*** Changes in GDB 6.1.1:
6511
6512* TUI (Text-mode User Interface) built-in (also included in GDB 6.1)
6513
6514The TUI (Text-mode User Interface) is now built as part of a default
6515GDB configuration. It is enabled by either selecting the TUI with the
6516command line option "-i=tui" or by running the separate "gdbtui"
6517program. For more information on the TUI, see the manual "Debugging
6518with GDB".
6519
6520* Pending breakpoint support (also included in GDB 6.1)
6521
6522Support has been added to allow you to specify breakpoints in shared
6523libraries that have not yet been loaded. If a breakpoint location
6524cannot be found, and the "breakpoint pending" option is set to auto,
6525GDB queries you if you wish to make the breakpoint pending on a future
6526shared-library load. If and when GDB resolves the breakpoint symbol,
6527the pending breakpoint is removed as one or more regular breakpoints
6528are created.
6529
6530Pending breakpoints are very useful for GCJ Java debugging.
6531
6532* Fixed ISO-C build problems
6533
6534The files bfd/elf-bfd.h, gdb/dictionary.c and gdb/types.c contained
6535non ISO-C code that stopped them being built using a more strict ISO-C
6536compiler (e.g., IBM's C compiler).
6537
6538* Fixed build problem on IRIX 5
6539
6540Due to header problems with <sys/proc.h>, the file gdb/proc-api.c
6541wasn't able to compile compile on an IRIX 5 system.
6542
6543* Added execute permission to gdb/gdbserver/configure
6544
6545The shell script gdb/testsuite/gdb.stabs/configure lacked execute
6546permission. This bug would cause configure to fail on a number of
6547systems (Solaris, IRIX). Ref: server/519.
6548
6549* Fixed build problem on hpux2.0w-hp-hpux11.00 using the HP ANSI C compiler
6550
6551Older HPUX ANSI C compilers did not accept variable array sizes. somsolib.c
6552has been updated to use constant array sizes.
6553
6554* Fixed a panic in the DWARF Call Frame Info code on Solaris 2.7
6555
6556GCC 3.3.2, on Solaris 2.7, includes the DW_EH_PE_funcrel encoding in
6557its generated DWARF Call Frame Info. This encoding was causing GDB to
6558panic, that panic has been fixed. Ref: gdb/1628.
6559
6560* Fixed a problem when examining parameters in shared library code.
6561
6562When examining parameters in optimized shared library code generated
6563by a mainline GCC, GDB would incorrectly report ``Variable "..." is
6564not available''. GDB now correctly displays the variable's value.
6565
faae5abe 6566*** Changes in GDB 6.1:
f2c06f52 6567
9175c9a3
MC
6568* Removed --with-mmalloc
6569
6570Support for the mmalloc memory manager has been removed, as it
6571conflicted with the internal gdb byte cache.
6572
3cc87ec0
MK
6573* Changes in AMD64 configurations
6574
6575The AMD64 target now includes the %cs and %ss registers. As a result
6576the AMD64 remote protocol has changed; this affects the floating-point
6577and SSE registers. If you rely on those registers for your debugging,
6578you should upgrade gdbserver on the remote side.
6579
f0424ef6
MK
6580* Revised SPARC target
6581
6582The SPARC target has been completely revised, incorporating the
6583FreeBSD/sparc64 support that was added for GDB 6.0. As a result
03cebad2
MK
6584support for LynxOS and SunOS 4 has been dropped. Calling functions
6585from within GDB on operating systems with a non-executable stack
6586(Solaris, OpenBSD) now works.
f0424ef6 6587
59659be2
ILT
6588* New C++ demangler
6589
6590GDB has a new C++ demangler which does a better job on the mangled
6591names generated by current versions of g++. It also runs faster, so
6592with this and other changes gdb should now start faster on large C++
6593programs.
6594
9e08b29b
DJ
6595* DWARF 2 Location Expressions
6596
6597GDB support for location expressions has been extended to support function
6598arguments and frame bases. Older versions of GDB could crash when they
6599encountered these.
6600
8dfe8985
DC
6601* C++ nested types and namespaces
6602
6603GDB's support for nested types and namespaces in C++ has been
6604improved, especially if you use the DWARF 2 debugging format. (This
6605is the default for recent versions of GCC on most platforms.)
6606Specifically, if you have a class "Inner" defined within a class or
6607namespace "Outer", then GDB realizes that the class's name is
6608"Outer::Inner", not simply "Inner". This should greatly reduce the
6609frequency of complaints about not finding RTTI symbols. In addition,
6610if you are stopped at inside of a function defined within a namespace,
6611GDB modifies its name lookup accordingly.
6612
cced5e27
MK
6613* New native configurations
6614
6615NetBSD/amd64 x86_64-*-netbsd*
27d1e716 6616OpenBSD/amd64 x86_64-*-openbsd*
2031c21a 6617OpenBSD/alpha alpha*-*-openbsd*
f2cab569
MK
6618OpenBSD/sparc sparc-*-openbsd*
6619OpenBSD/sparc64 sparc64-*-openbsd*
cced5e27 6620
b4b4b794
KI
6621* New debugging protocols
6622
6623M32R with SDI protocol m32r-*-elf*
6624
7989c619
AC
6625* "set prompt-escape-char" command deleted.
6626
6627The command "set prompt-escape-char" has been deleted. This command,
82f06518 6628and its very obscure effect on GDB's prompt, was never documented,
7989c619
AC
6629tested, nor mentioned in the NEWS file.
6630
5994185b
AC
6631* OBSOLETE configurations and files
6632
6633Configurations that have been declared obsolete in this release have
6634been commented out. Unless there is activity to revive these
6635configurations, the next release of GDB will have their sources
6636permanently REMOVED.
6637
6638Sun 3, running SunOS 3 m68*-*-sunos3*
6639Sun 3, running SunOS 4 m68*-*-sunos4*
6640Sun 2, running SunOS 3 m68000-*-sunos3*
6641Sun 2, running SunOS 4 m68000-*-sunos4*
6642Motorola 680x0 running LynxOS m68*-*-lynxos*
6643AT&T 3b1/Unix pc m68*-att-*
6644Bull DPX2 (68k, System V release 3) m68*-bull-sysv*
0748d941
AC
6645decstation mips-dec-* mips-little-*
6646riscos mips-*-riscos* mips-*-sysv*
6647sonymips mips-sony-*
6648sysv mips*-*-sysv4* (IRIX 5/6 not included)
5994185b 6649
0ddabb4c
AC
6650* REMOVED configurations and files
6651
6652SGI Irix-4.x mips-sgi-irix4 or iris4
6653SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
4a8269c0
AC
6654Z8000 simulator z8k-zilog-none or z8ksim
6655Matsushita MN10200 w/simulator mn10200-*-*
6656H8/500 simulator h8500-hitachi-hms or h8500hms
6657HP/PA running BSD hppa*-*-bsd*
6658HP/PA running OSF/1 hppa*-*-osf*
6659HP/PA Pro target hppa*-*-pro*
6660PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
cf7c5c23 6661386BSD i[3456]86-*-bsd*
4a8269c0
AC
6662Sequent family i[3456]86-sequent-sysv4*
6663 i[3456]86-sequent-sysv*
6664 i[3456]86-sequent-bsd*
f0424ef6
MK
6665SPARC running LynxOS sparc-*-lynxos*
6666SPARC running SunOS 4 sparc-*-sunos4*
4a8269c0
AC
6667Tsqware Sparclet sparclet-*-*
6668Fujitsu SPARClite sparclite-fujitsu-none or sparclite
0ddabb4c 6669
c7f1390e
DJ
6670*** Changes in GDB 6.0:
6671
1fe43d45
AC
6672* Objective-C
6673
6674Support for debugging the Objective-C programming language has been
6675integrated into GDB.
6676
e6beb428
AC
6677* New backtrace mechanism (includes DWARF 2 Call Frame Information).
6678
6679DWARF 2's Call Frame Information makes available compiler generated
6680information that more exactly describes the program's run-time stack.
6681By using this information, GDB is able to provide more robust stack
6682backtraces.
6683
6684The i386, amd64 (nee, x86-64), Alpha, m68hc11, ia64, and m32r targets
6685have been updated to use a new backtrace mechanism which includes
6686DWARF 2 CFI support.
6687
6688* Hosted file I/O.
6689
6690GDB's remote protocol has been extended to include support for hosted
6691file I/O (where the remote target uses GDB's file system). See GDB's
6692remote protocol documentation for details.
6693
6694* All targets using the new architecture framework.
6695
6696All of GDB's targets have been updated to use the new internal
6697architecture framework. The way is now open for future GDB releases
6698to include cross-architecture native debugging support (i386 on amd64,
6699ppc32 on ppc64).
6700
6701* GNU/Linux's Thread Local Storage (TLS)
6702
6703GDB now includes support for for the GNU/Linux implementation of
6704per-thread variables.
6705
6706* GNU/Linux's Native POSIX Thread Library (NPTL)
6707
6708GDB's thread code has been updated to work with either the new
6709GNU/Linux NPTL thread library or the older "LinuxThreads" library.
6710
6711* Separate debug info.
6712
6713GDB, in conjunction with BINUTILS, now supports a mechanism for
6714automatically loading debug information from a separate file. Instead
6715of shipping full debug and non-debug versions of system libraries,
6716system integrators can now instead ship just the stripped libraries
6717and optional debug files.
6718
6719* DWARF 2 Location Expressions
6720
6721DWARF 2 Location Expressions allow the compiler to more completely
6722describe the location of variables (even in optimized code) to the
6723debugger.
6724
6725GDB now includes preliminary support for location expressions (support
6726for DW_OP_piece is still missing).
6727
6728* Java
6729
6730A number of long standing bugs that caused GDB to die while starting a
6731Java application have been fixed. GDB's Java support is now
6732considered "useable".
6733
85f8f974
DJ
6734* GNU/Linux support for fork, vfork, and exec.
6735
6736The "catch fork", "catch exec", "catch vfork", and "set follow-fork-mode"
6737commands are now implemented for GNU/Linux. They require a 2.5.x or later
6738kernel.
6739
0fac0b41
DJ
6740* GDB supports logging output to a file
6741
6742There are two new commands, "set logging" and "show logging", which can be
6743used to capture GDB's output to a file.
f2c06f52 6744
6ad8ae5c
DJ
6745* The meaning of "detach" has changed for gdbserver
6746
6747The "detach" command will now resume the application, as documented. To
6748disconnect from gdbserver and leave it stopped, use the new "disconnect"
6749command.
6750
e286caf2 6751* d10v, m68hc11 `regs' command deprecated
5f601589
AC
6752
6753The `info registers' command has been updated so that it displays the
6754registers using a format identical to the old `regs' command.
6755
d28f9cdf
DJ
6756* Profiling support
6757
6758A new command, "maint set profile on/off", has been added. This command can
6759be used to enable or disable profiling while running GDB, to profile a
6760session or a set of commands. In addition there is a new configure switch,
6761"--enable-profiling", which will cause GDB to be compiled with profiling
6762data, for more informative profiling results.
6763
da0f9dcd
AC
6764* Default MI syntax changed to "mi2".
6765
6766The default MI (machine interface) syntax, enabled by the command line
6767option "-i=mi", has been changed to "mi2". The previous MI syntax,
b68767c1 6768"mi1", can be enabled by specifying the option "-i=mi1".
da0f9dcd
AC
6769
6770Support for the original "mi0" syntax (included in GDB 5.0) has been
6771removed.
6772
fb9b6b35
JJ
6773Fix for gdb/192: removed extraneous space when displaying frame level.
6774Fix for gdb/672: update changelist is now output in mi list format.
6775Fix for gdb/702: a -var-assign that updates the value now shows up
6776 in a subsequent -var-update.
6777
954a4db8
MK
6778* New native configurations.
6779
6780FreeBSD/amd64 x86_64-*-freebsd*
6781
6760f9e6
JB
6782* Multi-arched targets.
6783
b4263afa 6784HP/PA HPUX11 hppa*-*-hpux*
85a453d5 6785Renesas M32R/D w/simulator m32r-*-elf*
6760f9e6 6786
1b831c93
AC
6787* OBSOLETE configurations and files
6788
6789Configurations that have been declared obsolete in this release have
6790been commented out. Unless there is activity to revive these
6791configurations, the next release of GDB will have their sources
6792permanently REMOVED.
6793
8b0e5691 6794Z8000 simulator z8k-zilog-none or z8ksim
67f16606 6795Matsushita MN10200 w/simulator mn10200-*-*
fd2299bd 6796H8/500 simulator h8500-hitachi-hms or h8500hms
56056df7
AC
6797HP/PA running BSD hppa*-*-bsd*
6798HP/PA running OSF/1 hppa*-*-osf*
6799HP/PA Pro target hppa*-*-pro*
78c43945 6800PMAX (MIPS) running Mach 3.0 mips*-*-mach3*
2fbce691
AC
6801Sequent family i[3456]86-sequent-sysv4*
6802 i[3456]86-sequent-sysv*
6803 i[3456]86-sequent-bsd*
f81824a9
AC
6804Tsqware Sparclet sparclet-*-*
6805Fujitsu SPARClite sparclite-fujitsu-none or sparclite
fd2299bd 6806
5835abe7
NC
6807* REMOVED configurations and files
6808
6809V850EA ISA
1b831c93
AC
6810Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
6811IBM AIX PS/2 i[3456]86-*-aix
6812i386 running Mach 3.0 i[3456]86-*-mach3*
6813i386 running Mach i[3456]86-*-mach*
6814i386 running OSF/1 i[3456]86-*osf1mk*
6815HP/Apollo 68k Family m68*-apollo*-sysv*,
6816 m68*-apollo*-bsd*,
6817 m68*-hp-bsd*, m68*-hp-hpux*
6818Argonaut Risc Chip (ARC) arc-*-*
6819Mitsubishi D30V d30v-*-*
6820Fujitsu FR30 fr30-*-elf*
6821OS/9000 i[34]86-*-os9k
6822I960 with MON960 i960-*-coff
5835abe7 6823
a094c6fb
AC
6824* MIPS $fp behavior changed
6825
6826The convenience variable $fp, for the MIPS, now consistently returns
6827the address of the current frame's base. Previously, depending on the
6828context, $fp could refer to either $sp or the current frame's base
6829address. See ``8.10 Registers'' in the manual ``Debugging with GDB:
6830The GNU Source-Level Debugger''.
6831
299ffc64 6832*** Changes in GDB 5.3:
37057839 6833
46248966
AC
6834* GNU/Linux shared library multi-threaded performance improved.
6835
6836When debugging a multi-threaded application on GNU/Linux, GDB now uses
6837`/proc', in preference to `ptrace' for memory reads. This may result
6838in an improvement in the start-up time of multi-threaded, shared
6839library applications when run under GDB. One GDB user writes: ``loads
6840shared libs like mad''.
6841
b9d14705 6842* ``gdbserver'' now supports multi-threaded applications on some targets
6da02953 6843
b9d14705
DJ
6844Support for debugging multi-threaded applications which use
6845the GNU/Linux LinuxThreads package has been added for
6846arm*-*-linux*-gnu*, i[3456]86-*-linux*-gnu*, mips*-*-linux*-gnu*,
6847powerpc*-*-linux*-gnu*, and sh*-*-linux*-gnu*.
6da02953 6848
e0e9281e
JB
6849* GDB now supports C/C++ preprocessor macros.
6850
6851GDB now expands preprocessor macro invocations in C/C++ expressions,
6852and provides various commands for showing macro definitions and how
6853they expand.
6854
dd73b9bb
AC
6855The new command `macro expand EXPRESSION' expands any macro
6856invocations in expression, and shows the result.
6857
6858The new command `show macro MACRO-NAME' shows the definition of the
6859macro named MACRO-NAME, and where it was defined.
6860
e0e9281e
JB
6861Most compilers don't include information about macros in the debugging
6862information by default. In GCC 3.1, for example, you need to compile
6863your program with the options `-gdwarf-2 -g3'. If the macro
6864information is present in the executable, GDB will read it.
6865
2250ee0c
CV
6866* Multi-arched targets.
6867
6e3ba3b8
JT
6868DEC Alpha (partial) alpha*-*-*
6869DEC VAX (partial) vax-*-*
2250ee0c 6870NEC V850 v850-*-*
6e3ba3b8 6871National Semiconductor NS32000 (partial) ns32k-*-*
a1789893
GS
6872Motorola 68000 (partial) m68k-*-*
6873Motorola MCORE mcore-*-*
2250ee0c 6874
cd9bfe15 6875* New targets.
e33ce519 6876
456f8b9d
DB
6877Fujitsu FRV architecture added by Red Hat frv*-*-*
6878
e33ce519 6879
da8ca43d
JT
6880* New native configurations
6881
6882Alpha NetBSD alpha*-*-netbsd*
029923d4 6883SH NetBSD sh*-*-netbsdelf*
45888261 6884MIPS NetBSD mips*-*-netbsd*
9ce5c36a 6885UltraSPARC NetBSD sparc64-*-netbsd*
da8ca43d 6886
cd9bfe15
AC
6887* OBSOLETE configurations and files
6888
6889Configurations that have been declared obsolete in this release have
6890been commented out. Unless there is activity to revive these
6891configurations, the next release of GDB will have their sources
6892permanently REMOVED.
6893
92eb23c5 6894Mitsubishi D30V d30v-*-*
a99a9e1b 6895OS/9000 i[34]86-*-os9k
1c7cc583 6896IBM AIX PS/2 i[3456]86-*-aix
7a3085c1 6897Fujitsu FR30 fr30-*-elf*
7fb623f7 6898Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
eb4c54a2 6899Argonaut Risc Chip (ARC) arc-*-*
d8ee244c
MK
6900i386 running Mach 3.0 i[3456]86-*-mach3*
6901i386 running Mach i[3456]86-*-mach*
6902i386 running OSF/1 i[3456]86-*osf1mk*
822e978b
AC
6903HP/Apollo 68k Family m68*-apollo*-sysv*,
6904 m68*-apollo*-bsd*,
6905 m68*-hp-bsd*, m68*-hp-hpux*
4d210288 6906I960 with MON960 i960-*-coff
92eb23c5 6907
db034ac5
AC
6908* OBSOLETE languages
6909
6910CHILL, a Pascal like language used by telecommunications companies.
6911
cd9bfe15
AC
6912* REMOVED configurations and files
6913
6914AMD 29k family via UDI a29k-amd-udi, udi29k
6915A29K VxWorks a29k-*-vxworks
6916AMD 29000 embedded, using EBMON a29k-none-none
6917AMD 29000 embedded with COFF a29k-none-coff
6918AMD 29000 embedded with a.out a29k-none-aout
6919
6920testsuite/gdb.hp/gdb.threads-hp/ directory
6921
20f01a46
DH
6922* New command "set max-user-call-depth <nnn>"
6923
6924This command allows the user to limit the call depth of user-defined
6925commands. The default is 1024.
6926
a5941fbf
MK
6927* Changes in FreeBSD/i386 native debugging.
6928
6929Support for the "generate-core-file" has been added.
6930
89743e04
MS
6931* New commands "dump", "append", and "restore".
6932
6933These commands allow data to be copied from target memory
6934to a bfd-format or binary file (dump and append), and back
6935from a file into memory (restore).
37057839 6936
9fb14e79
JB
6937* Improved "next/step" support on multi-processor Alpha Tru64.
6938
6939The previous single-step mechanism could cause unpredictable problems,
6940including the random appearance of SIGSEGV or SIGTRAP signals. The use
6941of a software single-step mechanism prevents this.
6942
2037aebb
AC
6943*** Changes in GDB 5.2.1:
6944
6945* New targets.
6946
6947Atmel AVR avr*-*-*
6948
6949* Bug fixes
6950
6951gdb/182: gdb/323: gdb/237: On alpha, gdb was reporting:
6952mdebugread.c:2443: gdb-internal-error: sect_index_data not initialized
6953Fix, by Joel Brobecker imported from mainline.
6954
6955gdb/439: gdb/291: On some ELF object files, gdb was reporting:
6956dwarf2read.c:1072: gdb-internal-error: sect_index_text not initialize
6957Fix, by Fred Fish, imported from mainline.
6958
6959Dwarf2 .debug_frame & .eh_frame handler improved in many ways.
6960Surprisingly enough, it works now.
6961By Michal Ludvig, imported from mainline.
6962
6963i386 hardware watchpoint support:
6964avoid misses on second run for some targets.
6965By Pierre Muller, imported from mainline.
6966
37057839 6967*** Changes in GDB 5.2:
eb7cedd9 6968
1a703748
MS
6969* New command "set trust-readonly-sections on[off]".
6970
6971This command is a hint that tells gdb that read-only sections
6972really are read-only (ie. that their contents will not change).
6973In this mode, gdb will go to the object file rather than the
6974target to read memory from read-only sections (such as ".text").
6975This can be a significant performance improvement on some
6976(notably embedded) targets.
6977
cefd4ef5
MS
6978* New command "generate-core-file" (or "gcore").
6979
55241689
AC
6980This new gdb command allows the user to drop a core file of the child
6981process state at any time. So far it's been implemented only for
6982GNU/Linux and Solaris, but should be relatively easily ported to other
6983hosts. Argument is core file name (defaults to core.<pid>).
cefd4ef5 6984
352ed7b4
MS
6985* New command line option
6986
6987GDB now accepts --pid or -p followed by a process id.
6988
6989* Change in command line behavior -- corefiles vs. process ids.
6990
6991There is a subtle behavior in the way in which GDB handles
6992command line arguments. The first non-flag argument is always
6993a program to debug, but the second non-flag argument may either
6994be a corefile or a process id. Previously, GDB would attempt to
6995open the second argument as a corefile, and if that failed, would
6996issue a superfluous error message and then attempt to attach it as
6997a process. Now, if the second argument begins with a non-digit,
6998it will be treated as a corefile. If it begins with a digit,
6999GDB will attempt to attach it as a process, and if no such process
7000is found, will then attempt to open it as a corefile.
7001
fe419ffc
RE
7002* Changes in ARM configurations.
7003
7004Multi-arch support is enabled for all ARM configurations. The ARM/NetBSD
7005configuration is fully multi-arch.
7006
eb7cedd9
MK
7007* New native configurations
7008
fe419ffc 7009ARM NetBSD arm*-*-netbsd*
eb7cedd9 7010x86 OpenBSD i[3456]86-*-openbsd*
55241689 7011AMD x86-64 running GNU/Linux x86_64-*-linux-*
768f0842 7012Sparc64 running FreeBSD sparc64-*-freebsd*
eb7cedd9 7013
c9f63e6b
CV
7014* New targets
7015
7016Sanyo XStormy16 xstormy16-elf
7017
9b4ff276
AC
7018* OBSOLETE configurations and files
7019
7020Configurations that have been declared obsolete in this release have
7021been commented out. Unless there is activity to revive these
7022configurations, the next release of GDB will have their sources
7023permanently REMOVED.
7024
7025AMD 29k family via UDI a29k-amd-udi, udi29k
7026A29K VxWorks a29k-*-vxworks
7027AMD 29000 embedded, using EBMON a29k-none-none
7028AMD 29000 embedded with COFF a29k-none-coff
7029AMD 29000 embedded with a.out a29k-none-aout
7030
b4ceaee6 7031testsuite/gdb.hp/gdb.threads-hp/ directory
9b4ff276 7032
e2caac18
AC
7033* REMOVED configurations and files
7034
7035TI TMS320C80 tic80-*-*
7bc65f05 7036WDC 65816 w65-*-*
7768dd6c
AC
7037PowerPC Solaris powerpcle-*-solaris*
7038PowerPC Windows NT powerpcle-*-cygwin32
7039PowerPC Netware powerpc-*-netware*
5e734e1f 7040Harris/CXUX m88k m88*-harris-cxux*
1406caf7
AC
7041Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
7042 ns32k-utek-sysv* ns32k-utek-*
7e24f0b1 7043SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
9b567150 7044Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
3680c638
AC
7045Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
7046ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
a752853e 7047Apple Macintosh (MPW) host and target N/A host, powerpc-*-macos*
e2caac18 7048
c2a727fa
TT
7049* Changes to command line processing
7050
7051The new `--args' feature can be used to specify command-line arguments
7052for the inferior from gdb's command line.
7053
467d8519
TT
7054* Changes to key bindings
7055
7056There is a new `operate-and-get-next' function bound to `C-o'.
7057
7072a954
AC
7058*** Changes in GDB 5.1.1
7059
7060Fix compile problem on DJGPP.
7061
7062Fix a problem with floating-point registers on the i386 being
7063corrupted.
7064
7065Fix to stop GDB crashing on .debug_str debug info.
7066
7067Numerous documentation fixes.
7068
7069Numerous testsuite fixes.
7070
34f47bc4 7071*** Changes in GDB 5.1:
139760b7
MK
7072
7073* New native configurations
7074
7075Alpha FreeBSD alpha*-*-freebsd*
7076x86 FreeBSD 3.x and 4.x i[3456]86*-freebsd[34]*
55241689 7077MIPS GNU/Linux mips*-*-linux*
e23194cb
EZ
7078MIPS SGI Irix 6.x mips*-sgi-irix6*
7079ia64 AIX ia64-*-aix*
55241689 7080s390 and s390x GNU/Linux {s390,s390x}-*-linux*
139760b7 7081
bf64bfd6
AC
7082* New targets
7083
def90278 7084Motorola 68HC11 and 68HC12 m68hc11-elf
24be5c34 7085CRIS cris-axis
55241689 7086UltraSparc running GNU/Linux sparc64-*-linux*
def90278 7087
17e78a56 7088* OBSOLETE configurations and files
bf64bfd6
AC
7089
7090x86 FreeBSD before 2.2 i[3456]86*-freebsd{1,2.[01]}*,
9b9c068d 7091Harris/CXUX m88k m88*-harris-cxux*
bb19ff3b
AC
7092Most ns32k hosts and targets ns32k-*-mach3* ns32k-umax-*
7093 ns32k-utek-sysv* ns32k-utek-*
76f4ea53
AC
7094TI TMS320C80 tic80-*-*
7095WDC 65816 w65-*-*
4a1968f4 7096Ultracomputer (29K) running Sym1 a29k-nyu-sym1 a29k-*-kern*
1b2b2c16
AC
7097PowerPC Solaris powerpcle-*-solaris*
7098PowerPC Windows NT powerpcle-*-cygwin32
7099PowerPC Netware powerpc-*-netware*
24f89b68 7100SunOS 4.0.Xi on i386 i[3456]86-*-sunos*
514e603d
AC
7101Sony NEWS (68K) running NEWSOS 3.x m68*-sony-sysv news
7102ISI Optimum V (3.05) under 4.3bsd. m68*-isi-*
d036b4d9 7103Apple Macintosh (MPW) host N/A
bf64bfd6 7104
17e78a56
AC
7105stuff.c (Program to stuff files into a specially prepared space in kdb)
7106kdb-start.c (Main loop for the standalone kernel debugger)
7107
7fcca85b
AC
7108Configurations that have been declared obsolete in this release have
7109been commented out. Unless there is activity to revive these
7110configurations, the next release of GDB will have their sources
7111permanently REMOVED.
7112
a196c81c 7113* REMOVED configurations and files
7fcca85b
AC
7114
7115Altos 3068 m68*-altos-*
7116Convex c1-*-*, c2-*-*
7117Pyramid pyramid-*-*
7118ARM RISCix arm-*-* (as host)
7119Tahoe tahoe-*-*
a196c81c 7120ser-ocd.c *-*-*
bf64bfd6 7121
6d6b80e5 7122* GDB has been converted to ISO C.
e23194cb 7123
6d6b80e5 7124GDB's source code has been converted to ISO C. In particular, the
e23194cb
EZ
7125sources are fully protoized, and rely on standard headers being
7126present.
7127
bf64bfd6
AC
7128* Other news:
7129
e23194cb
EZ
7130* "info symbol" works on platforms which use COFF, ECOFF, XCOFF, and NLM.
7131
7132* The MI enabled by default.
7133
7134The new machine oriented interface (MI) introduced in GDB 5.0 has been
7135revised and enabled by default. Packages which use GDB as a debugging
7136engine behind a UI or another front end are encouraged to switch to
7137using the GDB/MI interface, instead of the old annotations interface
7138which is now deprecated.
7139
7140* Support for debugging Pascal programs.
7141
7142GDB now includes support for debugging Pascal programs. The following
7143main features are supported:
7144
7145 - Pascal-specific data types such as sets;
7146
7147 - automatic recognition of Pascal sources based on file-name
7148 extension;
7149
7150 - Pascal-style display of data types, variables, and functions;
7151
7152 - a Pascal expression parser.
7153
7154However, some important features are not yet supported.
7155
7156 - Pascal string operations are not supported at all;
7157
7158 - there are some problems with boolean types;
7159
7160 - Pascal type hexadecimal constants are not supported
7161 because they conflict with the internal variables format;
7162
7163 - support for Pascal objects and classes is not full yet;
7164
7165 - unlike Pascal, GDB is case-sensitive for symbol names.
7166
7167* Changes in completion.
7168
7169Commands such as `shell', `run' and `set args', which pass arguments
7170to inferior programs, now complete on file names, similar to what
7171users expect at the shell prompt.
7172
7173Commands which accept locations, such as `disassemble', `print',
7174`breakpoint', `until', etc. now complete on filenames as well as
7175program symbols. Thus, if you type "break foob TAB", and the source
7176files linked into the programs include `foobar.c', that file name will
7177be one of the candidates for completion. However, file names are not
7178considered for completion after you typed a colon that delimits a file
7179name from a name of a function in that file, as in "break foo.c:bar".
7180
7181`set demangle-style' completes on available demangling styles.
7182
7183* New platform-independent commands:
7184
7185It is now possible to define a post-hook for a command as well as a
7186hook that runs before the command. For more details, see the
7187documentation of `hookpost' in the GDB manual.
7188
7189* Changes in GNU/Linux native debugging.
7190
d7275149
MK
7191Support for debugging multi-threaded programs has been completely
7192revised for all platforms except m68k and sparc. You can now debug as
7193many threads as your system allows you to have.
7194
e23194cb
EZ
7195Attach/detach is supported for multi-threaded programs.
7196
d7275149
MK
7197Support for SSE registers was added for x86. This doesn't work for
7198multi-threaded programs though.
e23194cb
EZ
7199
7200* Changes in MIPS configurations.
bf64bfd6
AC
7201
7202Multi-arch support is enabled for all MIPS configurations.
7203
e23194cb
EZ
7204GDB can now be built as native debugger on SGI Irix 6.x systems for
7205debugging n32 executables. (Debugging 64-bit executables is not yet
7206supported.)
7207
7208* Unified support for hardware watchpoints in all x86 configurations.
7209
7210Most (if not all) native x86 configurations support hardware-assisted
7211breakpoints and watchpoints in a unified manner. This support
7212implements debug register sharing between watchpoints, which allows to
7213put a virtually infinite number of watchpoints on the same address,
7214and also supports watching regions up to 16 bytes with several debug
7215registers.
7216
7217The new maintenance command `maintenance show-debug-regs' toggles
7218debugging print-outs in functions that insert, remove, and test
7219watchpoints and hardware breakpoints.
7220
7221* Changes in the DJGPP native configuration.
7222
7223New command ``info dos sysinfo'' displays assorted information about
7224the CPU, OS, memory, and DPMI server.
7225
7226New commands ``info dos gdt'', ``info dos ldt'', and ``info dos idt''
7227display information about segment descriptors stored in GDT, LDT, and
7228IDT.
7229
7230New commands ``info dos pde'' and ``info dos pte'' display entries
7231from Page Directory and Page Tables (for now works with CWSDPMI only).
7232New command ``info dos address-pte'' displays the Page Table entry for
7233a given linear address.
7234
7235GDB can now pass command lines longer than 126 characters to the
7236program being debugged (requires an update to the libdbg.a library
7237which is part of the DJGPP development kit).
7238
7239DWARF2 debug info is now supported.
7240
6c56c069
EZ
7241It is now possible to `step' and `next' through calls to `longjmp'.
7242
e23194cb
EZ
7243* Changes in documentation.
7244
7245All GDB documentation was converted to GFDL, the GNU Free
7246Documentation License.
7247
7248Tracepoints-related commands are now fully documented in the GDB
7249manual.
7250
7251TUI, the Text-mode User Interface, is now documented in the manual.
7252
7253Tracepoints-related commands are now fully documented in the GDB
7254manual.
7255
7256The "GDB Internals" manual now has an index. It also includes
7257documentation of `ui_out' functions, GDB coding standards, x86
7258hardware watchpoints, and memory region attributes.
7259
5d6640b1
AC
7260* GDB's version number moved to ``version.in''
7261
7262The Makefile variable VERSION has been replaced by the file
7263``version.in''. People creating GDB distributions should update the
7264contents of this file.
7265
1a1d8446
AC
7266* gdba.el deleted
7267
7268GUD support is now a standard part of the EMACS distribution.
139760b7 7269
9debab2f 7270*** Changes in GDB 5.0:
7a292a7a 7271
c63ce875
EZ
7272* Improved support for debugging FP programs on x86 targets
7273
7274Unified and much-improved support for debugging floating-point
7275programs on all x86 targets. In particular, ``info float'' now
7276displays the FP registers in the same format on all x86 targets, with
7277greater level of detail.
7278
7279* Improvements and bugfixes in hardware-assisted watchpoints
7280
7281It is now possible to watch array elements, struct members, and
7282bitfields with hardware-assisted watchpoints. Data-read watchpoints
7283on x86 targets no longer erroneously trigger when the address is
7284written.
7285
7286* Improvements in the native DJGPP version of GDB
7287
7288The distribution now includes all the scripts and auxiliary files
7289necessary to build the native DJGPP version on MS-DOS/MS-Windows
7290machines ``out of the box''.
7291
7292The DJGPP version can now debug programs that use signals. It is
7293possible to catch signals that happened in the debuggee, deliver
7294signals to it, interrupt it with Ctrl-C, etc. (Previously, a signal
7295would kill the program being debugged.) Programs that hook hardware
7296interrupts (keyboard, timer, etc.) can also be debugged.
7297
7298It is now possible to debug DJGPP programs that redirect their
7299standard handles or switch them to raw (as opposed to cooked) mode, or
7300even close them. The command ``run < foo > bar'' works as expected,
7301and ``info terminal'' reports useful information about the debuggee's
7302terminal, including raw/cooked mode, redirection, etc.
7303
7304The DJGPP version now uses termios functions for console I/O, which
7305enables debugging graphics programs. Interrupting GDB with Ctrl-C
7306also works.
7307
7308DOS-style file names with drive letters are now fully supported by
7309GDB.
7310
7311It is now possible to debug DJGPP programs that switch their working
7312directory. It is also possible to rerun the debuggee any number of
7313times without restarting GDB; thus, you can use the same setup,
7314breakpoints, etc. for many debugging sessions.
7315
ed9a39eb
JM
7316* New native configurations
7317
7318ARM GNU/Linux arm*-*-linux*
afc05dd4 7319PowerPC GNU/Linux powerpc-*-linux*
ed9a39eb 7320
7a292a7a
SS
7321* New targets
7322
96baa820 7323Motorola MCore mcore-*-*
adf40b2e
JM
7324x86 VxWorks i[3456]86-*-vxworks*
7325PowerPC VxWorks powerpc-*-vxworks*
7a292a7a
SS
7326TI TMS320C80 tic80-*-*
7327
085dd6e6
JM
7328* OBSOLETE configurations
7329
7330Altos 3068 m68*-altos-*
7331Convex c1-*-*, c2-*-*
9846de1b 7332Pyramid pyramid-*-*
ed9a39eb 7333ARM RISCix arm-*-* (as host)
104c1213 7334Tahoe tahoe-*-*
7a292a7a 7335
9debab2f
AC
7336Configurations that have been declared obsolete will be commented out,
7337but the code will be left in place. If there is no activity to revive
7338these configurations before the next release of GDB, the sources will
7339be permanently REMOVED.
7340
5330533d
SS
7341* Gould support removed
7342
7343Support for the Gould PowerNode and NP1 has been removed.
7344
bc9e5bbf
AC
7345* New features for SVR4
7346
7347On SVR4 native platforms (such as Solaris), if you attach to a process
7348without first loading a symbol file, GDB will now attempt to locate and
7349load symbols from the running process's executable file.
7350
7351* Many C++ enhancements
7352
7353C++ support has been greatly improved. Overload resolution now works properly
7354in almost all cases. RTTI support is on the way.
7355
adf40b2e
JM
7356* Remote targets can connect to a sub-program
7357
7358A popen(3) style serial-device has been added. This device starts a
7359sub-process (such as a stand-alone simulator) and then communicates
7360with that. The sub-program to run is specified using the syntax
7361``|<program> <args>'' vis:
7362
7363 (gdb) set remotedebug 1
7364 (gdb) target extended-remote |mn10300-elf-sim program-args
7365
43e526b9
JM
7366* MIPS 64 remote protocol
7367
7368A long standing bug in the mips64 remote protocol where by GDB
7369expected certain 32 bit registers (ex SR) to be transfered as 32
7370instead of 64 bits has been fixed.
7371
7372The command ``set remote-mips64-transfers-32bit-regs on'' has been
7373added to provide backward compatibility with older versions of GDB.
7374
96baa820
JM
7375* ``set remotebinarydownload'' replaced by ``set remote X-packet''
7376
7377The command ``set remotebinarydownload'' command has been replaced by
7378``set remote X-packet''. Other commands in ``set remote'' family
7379include ``set remote P-packet''.
7380
11cf8741
JM
7381* Breakpoint commands accept ranges.
7382
7383The breakpoint commands ``enable'', ``disable'', and ``delete'' now
7384accept a range of breakpoints, e.g. ``5-7''. The tracepoint command
7385``tracepoint passcount'' also accepts a range of tracepoints.
7386
7876dd43
DB
7387* ``apropos'' command added.
7388
7389The ``apropos'' command searches through command names and
7390documentation strings, printing out matches, making it much easier to
7391try to find a command that does what you are looking for.
7392
bc9e5bbf
AC
7393* New MI interface
7394
7395A new machine oriented interface (MI) has been added to GDB. This
7396interface is designed for debug environments running GDB as a separate
7162c0ca
EZ
7397process. This is part of the long term libGDB project. See the
7398"GDB/MI" chapter of the GDB manual for further information. It can be
7399enabled by configuring with:
bc9e5bbf
AC
7400
7401 .../configure --enable-gdbmi
7402
c906108c
SS
7403*** Changes in GDB-4.18:
7404
7405* New native configurations
7406
7407HP-UX 10.20 hppa*-*-hpux10.20
7408HP-UX 11.x hppa*-*-hpux11.0*
55241689 7409M68K GNU/Linux m68*-*-linux*
c906108c
SS
7410
7411* New targets
7412
7413Fujitsu FR30 fr30-*-elf*
7414Intel StrongARM strongarm-*-*
7415Mitsubishi D30V d30v-*-*
7416
7417* OBSOLETE configurations
7418
7419Gould PowerNode, NP1 np1-*-*, pn-*-*
7420
7421Configurations that have been declared obsolete will be commented out,
7422but the code will be left in place. If there is no activity to revive
7423these configurations before the next release of GDB, the sources will
7424be permanently REMOVED.
7425
7426* ANSI/ISO C
7427
7428As a compatibility experiment, GDB's source files buildsym.h and
7429buildsym.c have been converted to pure standard C, no longer
7430containing any K&R compatibility code. We believe that all systems in
7431use today either come with a standard C compiler, or have a GCC port
7432available. If this is not true, please report the affected
7433configuration to bug-gdb@gnu.org immediately. See the README file for
7434information about getting a standard C compiler if you don't have one
7435already.
7436
7437* Readline 2.2
7438
7439GDB now uses readline 2.2.
7440
7441* set extension-language
7442
7443You can now control the mapping between filename extensions and source
7444languages by using the `set extension-language' command. For instance,
7445you can ask GDB to treat .c files as C++ by saying
7446 set extension-language .c c++
7447The command `info extensions' lists all of the recognized extensions
7448and their associated languages.
7449
7450* Setting processor type for PowerPC and RS/6000
7451
7452When GDB is configured for a powerpc*-*-* or an rs6000*-*-* target,
7453you can use the `set processor' command to specify what variant of the
7454PowerPC family you are debugging. The command
7455
7456 set processor NAME
7457
7458sets the PowerPC/RS6000 variant to NAME. GDB knows about the
7459following PowerPC and RS6000 variants:
7460
7461 ppc-uisa PowerPC UISA - a PPC processor as viewed by user-level code
7462 rs6000 IBM RS6000 ("POWER") architecture, user-level view
7463 403 IBM PowerPC 403
7464 403GC IBM PowerPC 403GC
7465 505 Motorola PowerPC 505
7466 860 Motorola PowerPC 860 or 850
7467 601 Motorola PowerPC 601
7468 602 Motorola PowerPC 602
7469 603 Motorola/IBM PowerPC 603 or 603e
7470 604 Motorola PowerPC 604 or 604e
7471 750 Motorola/IBM PowerPC 750 or 750
7472
7473At the moment, this command just tells GDB what to name the
7474special-purpose processor registers. Since almost all the affected
7475registers are inaccessible to user-level programs, this command is
7476only useful for remote debugging in its present form.
7477
7478* HP-UX support
7479
7480Thanks to a major code donation from Hewlett-Packard, GDB now has much
7481more extensive support for HP-UX. Added features include shared
7482library support, kernel threads and hardware watchpoints for 11.00,
7483support for HP's ANSI C and C++ compilers, and a compatibility mode
7484for xdb and dbx commands.
7485
7486* Catchpoints
7487
7488HP's donation includes the new concept of catchpoints, which is a
7489generalization of the old catch command. On HP-UX, it is now possible
7490to catch exec, fork, and vfork, as well as library loading.
7491
7492This means that the existing catch command has changed; its first
7493argument now specifies the type of catch to be set up. See the
7494output of "help catch" for a list of catchpoint types.
7495
7496* Debugging across forks
7497
7498On HP-UX, you can choose which process to debug when a fork() happens
7499in the inferior.
7500
7501* TUI
7502
7503HP has donated a curses-based terminal user interface (TUI). To get
7504it, build with --enable-tui. Although this can be enabled for any
7505configuration, at present it only works for native HP debugging.
7506
7507* GDB remote protocol additions
7508
7509A new protocol packet 'X' that writes binary data is now available.
7510Default behavior is to try 'X', then drop back to 'M' if the stub
7511fails to respond. The settable variable `remotebinarydownload'
7512allows explicit control over the use of 'X'.
7513
7514For 64-bit targets, the memory packets ('M' and 'm') can now contain a
7515full 64-bit address. The command
7516
7517 set remoteaddresssize 32
7518
7519can be used to revert to the old behaviour. For existing remote stubs
7520the change should not be noticed, as the additional address information
7521will be discarded.
7522
7523In order to assist in debugging stubs, you may use the maintenance
7524command `packet' to send any text string to the stub. For instance,
7525
7526 maint packet heythere
7527
7528sends the packet "$heythere#<checksum>". Note that it is very easy to
7529disrupt a debugging session by sending the wrong packet at the wrong
7530time.
7531
7532The compare-sections command allows you to compare section data on the
7533target to what is in the executable file without uploading or
7534downloading, by comparing CRC checksums.
7535
7536* Tracing can collect general expressions
7537
7538You may now collect general expressions at tracepoints. This requires
7539further additions to the target-side stub; see tracepoint.c and
7540doc/agentexpr.texi for further details.
7541
7542* mask-address variable for Mips
7543
7544For Mips targets, you may control the zeroing of the upper 32 bits of
7545a 64-bit address by entering `set mask-address on'. This is mainly
7546of interest to users of embedded R4xxx and R5xxx processors.
7547
7548* Higher serial baud rates
7549
7550GDB's serial code now allows you to specify baud rates 57600, 115200,
7551230400, and 460800 baud. (Note that your host system may not be able
7552to achieve all of these rates.)
7553
7554* i960 simulator
7555
7556The i960 configuration now includes an initial implementation of a
7557builtin simulator, contributed by Jim Wilson.
7558
7559
7560*** Changes in GDB-4.17:
7561
7562* New native configurations
7563
7564Alpha GNU/Linux alpha*-*-linux*
7565Unixware 2.x i[3456]86-unixware2*
7566Irix 6.x mips*-sgi-irix6*
7567PowerPC GNU/Linux powerpc-*-linux*
7568PowerPC Solaris powerpcle-*-solaris*
7569Sparc GNU/Linux sparc-*-linux*
7570Motorola sysV68 R3V7.1 m68k-motorola-sysv
7571
7572* New targets
7573
7574Argonaut Risc Chip (ARC) arc-*-*
7575Hitachi H8/300S h8300*-*-*
7576Matsushita MN10200 w/simulator mn10200-*-*
7577Matsushita MN10300 w/simulator mn10300-*-*
7578MIPS NEC VR4100 mips64*vr4100*{,el}-*-elf*
7579MIPS NEC VR5000 mips64*vr5000*{,el}-*-elf*
7580MIPS Toshiba TX39 mips64*tx39*{,el}-*-elf*
7581Mitsubishi D10V w/simulator d10v-*-*
7582Mitsubishi M32R/D w/simulator m32r-*-elf*
7583Tsqware Sparclet sparclet-*-*
7584NEC V850 w/simulator v850-*-*
7585
7586* New debugging protocols
7587
7588ARM with RDI protocol arm*-*-*
7589M68K with dBUG monitor m68*-*-{aout,coff,elf}
7590DDB and LSI variants of PMON protocol mips*-*-*
7591PowerPC with DINK32 monitor powerpc{,le}-*-eabi
7592PowerPC with SDS protocol powerpc{,le}-*-eabi
7593Macraigor OCD (Wiggler) devices powerpc{,le}-*-eabi
7594
7595* DWARF 2
7596
7597All configurations can now understand and use the DWARF 2 debugging
7598format. The choice is automatic, if the symbol file contains DWARF 2
7599information.
7600
7601* Java frontend
7602
7603GDB now includes basic Java language support. This support is
7604only useful with Java compilers that produce native machine code.
7605
7606* solib-absolute-prefix and solib-search-path
7607
7608For SunOS and SVR4 shared libraries, you may now set the prefix for
7609loading absolute shared library symbol files, and the search path for
7610locating non-absolute shared library symbol files.
7611
7612* Live range splitting
7613
7614GDB can now effectively debug code for which GCC has performed live
7615range splitting as part of its optimization. See gdb/doc/LRS for
7616more details on the expected format of the stabs information.
7617
7618* Hurd support
7619
7620GDB's support for the GNU Hurd, including thread debugging, has been
7621updated to work with current versions of the Hurd.
7622
7623* ARM Thumb support
7624
7625GDB's ARM target configuration now handles the ARM7T (Thumb) 16-bit
7626instruction set. ARM GDB automatically detects when Thumb
7627instructions are in use, and adjusts disassembly and backtracing
7628accordingly.
7629
7630* MIPS16 support
7631
7632GDB's MIPS target configurations now handle the MIP16 16-bit
7633instruction set.
7634
7635* Overlay support
7636
7637GDB now includes support for overlays; if an executable has been
7638linked such that multiple sections are based at the same address, GDB
7639will decide which section to use for symbolic info. You can choose to
7640control the decision manually, using overlay commands, or implement
7641additional target-side support and use "overlay load-target" to bring
7642in the overlay mapping. Do "help overlay" for more detail.
7643
7644* info symbol
7645
7646The command "info symbol <address>" displays information about
7647the symbol at the specified address.
7648
7649* Trace support
7650
7651The standard remote protocol now includes an extension that allows
7652asynchronous collection and display of trace data. This requires
7653extensive support in the target-side debugging stub. Tracing mode
7654includes a new interaction mode in GDB and new commands: see the
7655file tracepoint.c for more details.
7656
7657* MIPS simulator
7658
7659Configurations for embedded MIPS now include a simulator contributed
7660by Cygnus Solutions. The simulator supports the instruction sets
7661of most MIPS variants.
7662
7663* Sparc simulator
7664
7665Sparc configurations may now include the ERC32 simulator contributed
7666by the European Space Agency. The simulator is not built into
7667Sparc targets by default; configure with --enable-sim to include it.
7668
7669* set architecture
7670
7671For target configurations that may include multiple variants of a
7672basic architecture (such as MIPS and SH), you may now set the
7673architecture explicitly. "set arch" sets, "info arch" lists
7674the possible architectures.
7675
7676*** Changes in GDB-4.16:
7677
7678* New native configurations
7679
7680Windows 95, x86 Windows NT i[345]86-*-cygwin32
7681M68K NetBSD m68k-*-netbsd*
7682PowerPC AIX 4.x powerpc-*-aix*
7683PowerPC MacOS powerpc-*-macos*
7684PowerPC Windows NT powerpcle-*-cygwin32
7685RS/6000 AIX 4.x rs6000-*-aix4*
7686
7687* New targets
7688
7689ARM with RDP protocol arm-*-*
7690I960 with MON960 i960-*-coff
7691MIPS VxWorks mips*-*-vxworks*
7692MIPS VR4300 with PMON mips64*vr4300{,el}-*-elf*
7693PowerPC with PPCBUG monitor powerpc{,le}-*-eabi*
7694Hitachi SH3 sh-*-*
7695Matra Sparclet sparclet-*-*
7696
7697* PowerPC simulator
7698
7699The powerpc-eabi configuration now includes the PSIM simulator,
7700contributed by Andrew Cagney, with assistance from Mike Meissner.
7701PSIM is a very elaborate model of the PowerPC, including not only
7702basic instruction set execution, but also details of execution unit
7703performance and I/O hardware. See sim/ppc/README for more details.
7704
7705* Solaris 2.5
7706
7707GDB now works with Solaris 2.5.
7708
7709* Windows 95/NT native
7710
7711GDB will now work as a native debugger on Windows 95 and Windows NT.
7712To build it from source, you must use the "gnu-win32" environment,
7713which uses a DLL to emulate enough of Unix to run the GNU tools.
7714Further information, binaries, and sources are available at
7715ftp.cygnus.com, under pub/gnu-win32.
7716
7717* dont-repeat command
7718
7719If a user-defined command includes the command `dont-repeat', then the
7720command will not be repeated if the user just types return. This is
7721useful if the command is time-consuming to run, so that accidental
7722extra keystrokes don't run the same command many times.
7723
7724* Send break instead of ^C
7725
7726The standard remote protocol now includes an option to send a break
7727rather than a ^C to the target in order to interrupt it. By default,
7728GDB will send ^C; to send a break, set the variable `remotebreak' to 1.
7729
7730* Remote protocol timeout
7731
7732The standard remote protocol includes a new variable `remotetimeout'
7733that allows you to set the number of seconds before GDB gives up trying
7734to read from the target. The default value is 2.
7735
7736* Automatic tracking of dynamic object loading (HPUX and Solaris only)
7737
7738By default GDB will automatically keep track of objects as they are
7739loaded and unloaded by the dynamic linker. By using the command `set
7740stop-on-solib-events 1' you can arrange for GDB to stop the inferior
7741when shared library events occur, thus allowing you to set breakpoints
7742in shared libraries which are explicitly loaded by the inferior.
7743
7744Note this feature does not work on hpux8. On hpux9 you must link
7745/usr/lib/end.o into your program. This feature should work
7746automatically on hpux10.
7747
7748* Irix 5.x hardware watchpoint support
7749
7750Irix 5 configurations now support the use of hardware watchpoints.
7751
7752* Mips protocol "SYN garbage limit"
7753
7754When debugging a Mips target using the `target mips' protocol, you
7755may set the number of characters that GDB will ignore by setting
7756the `syn-garbage-limit'. A value of -1 means that GDB will ignore
7757every character. The default value is 1050.
7758
7759* Recording and replaying remote debug sessions
7760
7761If you set `remotelogfile' to the name of a file, gdb will write to it
7762a recording of a remote debug session. This recording may then be
7763replayed back to gdb using "gdbreplay". See gdbserver/README for
7764details. This is useful when you have a problem with GDB while doing
7765remote debugging; you can make a recording of the session and send it
7766to someone else, who can then recreate the problem.
7767
7768* Speedups for remote debugging
7769
7770GDB includes speedups for downloading and stepping MIPS systems using
7771the IDT monitor, fast downloads to the Hitachi SH E7000 emulator,
7772and more efficient S-record downloading.
7773
7774* Memory use reductions and statistics collection
7775
7776GDB now uses less memory and reports statistics about memory usage.
7777Try the `maint print statistics' command, for example.
7778
7779*** Changes in GDB-4.15:
7780
7781* Psymtabs for XCOFF
7782
7783The symbol reader for AIX GDB now uses partial symbol tables. This
7784can greatly improve startup time, especially for large executables.
7785
7786* Remote targets use caching
7787
7788Remote targets now use a data cache to speed up communication with the
7789remote side. The data cache could lead to incorrect results because
7790it doesn't know about volatile variables, thus making it impossible to
7791debug targets which use memory mapped I/O devices. `set remotecache
09f2921c 7792off' turns the data cache off.
c906108c
SS
7793
7794* Remote targets may have threads
7795
7796The standard remote protocol now includes support for multiple threads
7797in the target system, using new protocol commands 'H' and 'T'. See
7798gdb/remote.c for details.
7799
7800* NetROM support
7801
7802If GDB is configured with `--enable-netrom', then it will include
7803support for the NetROM ROM emulator from XLNT Designs. The NetROM
7804acts as though it is a bank of ROM on the target board, but you can
7805write into it over the network. GDB's support consists only of
7806support for fast loading into the emulated ROM; to debug, you must use
7807another protocol, such as standard remote protocol. The usual
7808sequence is something like
7809
7810 target nrom <netrom-hostname>
7811 load <prog>
7812 target remote <netrom-hostname>:1235
7813
7814* Macintosh host
7815
7816GDB now includes support for the Apple Macintosh, as a host only. It
7817may be run as either an MPW tool or as a standalone application, and
7818it can debug through the serial port. All the usual GDB commands are
7819available, but to the target command, you must supply "serial" as the
7820device type instead of "/dev/ttyXX". See mpw-README in the main
7821directory for more information on how to build. The MPW configuration
7822scripts */mpw-config.in support only a few targets, and only the
7823mips-idt-ecoff target has been tested.
7824
7825* Autoconf
7826
7827GDB configuration now uses autoconf. This is not user-visible,
7828but does simplify configuration and building.
7829
7830* hpux10
7831
7832GDB now supports hpux10.
7833
7834*** Changes in GDB-4.14:
7835
7836* New native configurations
7837
7838x86 FreeBSD i[345]86-*-freebsd
7839x86 NetBSD i[345]86-*-netbsd
7840NS32k NetBSD ns32k-*-netbsd
7841Sparc NetBSD sparc-*-netbsd
7842
7843* New targets
7844
7845A29K VxWorks a29k-*-vxworks
7846HP PA PRO embedded (WinBond W89K & Oki OP50N) hppa*-*-pro*
7847CPU32 EST-300 emulator m68*-*-est*
7848PowerPC ELF powerpc-*-elf
7849WDC 65816 w65-*-*
7850
7851* Alpha OSF/1 support for procfs
7852
7853GDB now supports procfs under OSF/1-2.x and higher, which makes it
7854possible to attach to running processes. As the mounting of the /proc
7855filesystem is optional on the Alpha, GDB automatically determines
7856the availability of /proc during startup. This can lead to problems
7857if /proc is unmounted after GDB has been started.
7858
7859* Arguments to user-defined commands
7860
7861User commands may accept up to 10 arguments separated by whitespace.
7862Arguments are accessed within the user command via $arg0..$arg9. A
7863trivial example:
7864define adder
7865 print $arg0 + $arg1 + $arg2
7866
7867To execute the command use:
7868adder 1 2 3
7869
7870Defines the command "adder" which prints the sum of its three arguments.
7871Note the arguments are text substitutions, so they may reference variables,
7872use complex expressions, or even perform inferior function calls.
7873
7874* New `if' and `while' commands
7875
7876This makes it possible to write more sophisticated user-defined
7877commands. Both commands take a single argument, which is the
7878expression to evaluate, and must be followed by the commands to
7879execute, one per line, if the expression is nonzero, the list being
7880terminated by the word `end'. The `if' command list may include an
7881`else' word, which causes the following commands to be executed only
7882if the expression is zero.
7883
7884* Fortran source language mode
7885
7886GDB now includes partial support for Fortran 77. It will recognize
7887Fortran programs and can evaluate a subset of Fortran expressions, but
7888variables and functions may not be handled correctly. GDB will work
7889with G77, but does not yet know much about symbols emitted by other
7890Fortran compilers.
7891
7892* Better HPUX support
7893
7894Most debugging facilities now work on dynamic executables for HPPAs
7895running hpux9 or later. You can attach to running dynamically linked
7896processes, but by default the dynamic libraries will be read-only, so
7897for instance you won't be able to put breakpoints in them. To change
7898that behavior do the following before running the program:
7899
7900 adb -w a.out
7901 __dld_flags?W 0x5
7902 control-d
7903
7904This will cause the libraries to be mapped private and read-write.
7905To revert to the normal behavior, do this:
7906
7907 adb -w a.out
7908 __dld_flags?W 0x4
7909 control-d
7910
7911You cannot set breakpoints or examine data in the library until after
7912the library is loaded if the function/data symbols do not have
7913external linkage.
7914
7915GDB can now also read debug symbols produced by the HP C compiler on
7916HPPAs (sorry, no C++, Fortran or 68k support).
7917
7918* Target byte order now dynamically selectable
7919
7920You can choose which byte order to use with a target system, via the
7921commands "set endian big" and "set endian little", and you can see the
7922current setting by using "show endian". You can also give the command
7923"set endian auto", in which case GDB will use the byte order
7924associated with the executable. Currently, only embedded MIPS
7925configurations support dynamic selection of target byte order.
7926
7927* New DOS host serial code
7928
7929This version uses DPMI interrupts to handle buffered I/O, so you
7930no longer need to run asynctsr when debugging boards connected to
7931a PC's serial port.
7932
7933*** Changes in GDB-4.13:
7934
7935* New "complete" command
7936
7937This lists all the possible completions for the rest of the line, if it
7938were to be given as a command itself. This is intended for use by emacs.
7939
7940* Trailing space optional in prompt
7941
7942"set prompt" no longer adds a space for you after the prompt you set. This
7943allows you to set a prompt which ends in a space or one that does not.
7944
7945* Breakpoint hit counts
7946
7947"info break" now displays a count of the number of times the breakpoint
7948has been hit. This is especially useful in conjunction with "ignore"; you
7949can ignore a large number of breakpoint hits, look at the breakpoint info
7950to see how many times the breakpoint was hit, then run again, ignoring one
7951less than that number, and this will get you quickly to the last hit of
7952that breakpoint.
7953
7954* Ability to stop printing at NULL character
7955
7956"set print null-stop" will cause GDB to stop printing the characters of
7957an array when the first NULL is encountered. This is useful when large
7958arrays actually contain only short strings.
7959
7960* Shared library breakpoints
7961
7962In SunOS 4.x, SVR4, and Alpha OSF/1 configurations, you can now set
7963breakpoints in shared libraries before the executable is run.
7964
7965* Hardware watchpoints
7966
7967There is a new hardware breakpoint for the watch command for sparclite
7968targets. See gdb/sparclite/hw_breakpoint.note.
7969
55241689 7970Hardware watchpoints are also now supported under GNU/Linux.
c906108c
SS
7971
7972* Annotations
7973
7974Annotations have been added. These are for use with graphical interfaces,
7975and are still experimental. Currently only gdba.el uses these.
7976
7977* Improved Irix 5 support
7978
7979GDB now works properly with Irix 5.2.
7980
7981* Improved HPPA support
7982
7983GDB now works properly with the latest GCC and GAS.
7984
7985* New native configurations
7986
7987Sequent PTX4 i[34]86-sequent-ptx4
7988HPPA running OSF/1 hppa*-*-osf*
7989Atari TT running SVR4 m68*-*-sysv4*
7990RS/6000 LynxOS rs6000-*-lynxos*
7991
7992* New targets
7993
7994OS/9000 i[34]86-*-os9k
7995MIPS R4000 mips64*{,el}-*-{ecoff,elf}
7996Sparc64 sparc64-*-*
7997
7998* Hitachi SH7000 and E7000-PC ICE support
7999
8000There is now support for communicating with the Hitachi E7000-PC ICE.
8001This is available automatically when GDB is configured for the SH.
8002
8003* Fixes
8004
8005As usual, a variety of small fixes and improvements, both generic
8006and configuration-specific. See the ChangeLog for more detail.
8007
8008*** Changes in GDB-4.12:
8009
8010* Irix 5 is now supported
8011
8012* HPPA support
8013
8014GDB-4.12 on the HPPA has a number of changes which make it unable
8015to debug the output from the currently released versions of GCC and
8016GAS (GCC 2.5.8 and GAS-2.2 or PAGAS-1.36). Until the next major release
8017of GCC and GAS, versions of these tools designed to work with GDB-4.12
8018can be retrieved via anonymous ftp from jaguar.cs.utah.edu:/dist.
8019
8020
8021*** Changes in GDB-4.11:
8022
8023* User visible changes:
8024
8025* Remote Debugging
8026
8027The "set remotedebug" option is now consistent between the mips remote
8028target, remote targets using the gdb-specific protocol, UDI (AMD's
8029debug protocol for the 29k) and the 88k bug monitor. It is now an
8030integer specifying a debug level (normally 0 or 1, but 2 means more
8031debugging info for the mips target).
8032
8033* DEC Alpha native support
8034
8035GDB now works on the DEC Alpha. GCC 2.4.5 does not produce usable
8036debug info, but GDB works fairly well with the DEC compiler and should
8037work with a future GCC release. See the README file for a few
8038Alpha-specific notes.
8039
8040* Preliminary thread implementation
8041
8042GDB now has preliminary thread support for both SGI/Irix and LynxOS.
8043
8044* LynxOS native and target support for 386
8045
8046This release has been hosted on LynxOS 2.2, and also can be configured
8047to remotely debug programs running under LynxOS (see gdb/gdbserver/README
8048for details).
8049
8050* Improvements in C++ mangling/demangling.
8051
8052This release has much better g++ debugging, specifically in name
8053mangling/demangling, virtual function calls, print virtual table,
8054call methods, ...etc.
8055
8056*** Changes in GDB-4.10:
8057
8058 * User visible changes:
8059
8060Remote debugging using the GDB-specific (`target remote') protocol now
8061supports the `load' command. This is only useful if you have some
8062other way of getting the stub to the target system, and you can put it
8063somewhere in memory where it won't get clobbered by the download.
8064
8065Filename completion now works.
8066
8067When run under emacs mode, the "info line" command now causes the
8068arrow to point to the line specified. Also, "info line" prints
8069addresses in symbolic form (as well as hex).
8070
8071All vxworks based targets now support a user settable option, called
8072vxworks-timeout. This option represents the number of seconds gdb
8073should wait for responses to rpc's. You might want to use this if
8074your vxworks target is, perhaps, a slow software simulator or happens
8075to be on the far side of a thin network line.
8076
8077 * DEC alpha support
8078
8079This release contains support for using a DEC alpha as a GDB host for
8080cross debugging. Native alpha debugging is not supported yet.
8081
8082
8083*** Changes in GDB-4.9:
8084
8085 * Testsuite
8086
8087This is the first GDB release which is accompanied by a matching testsuite.
8088The testsuite requires installation of dejagnu, which should be available
8089via ftp from most sites that carry GNU software.
8090
8091 * C++ demangling
8092
8093'Cfront' style demangling has had its name changed to 'ARM' style, to
8094emphasize that it was written from the specifications in the C++ Annotated
8095Reference Manual, not necessarily to be compatible with AT&T cfront. Despite
8096disclaimers, it still generated too much confusion with users attempting to
8097use gdb with AT&T cfront.
8098
8099 * Simulators
8100
8101GDB now uses a standard remote interface to a simulator library.
8102So far, the library contains simulators for the Zilog Z8001/2, the
8103Hitachi H8/300, H8/500 and Super-H.
8104
8105 * New targets supported
8106
8107H8/300 simulator h8300-hitachi-hms or h8300hms
8108H8/500 simulator h8500-hitachi-hms or h8500hms
8109SH simulator sh-hitachi-hms or sh
8110Z8000 simulator z8k-zilog-none or z8ksim
8111IDT MIPS board over serial line mips-idt-ecoff
8112
8113Cross-debugging to GO32 targets is supported. It requires a custom
8114version of the i386-stub.c module which is integrated with the
8115GO32 memory extender.
8116
8117 * New remote protocols
8118
8119MIPS remote debugging protocol.
8120
8121 * New source languages supported
8122
8123This version includes preliminary support for Chill, a Pascal like language
8124used by telecommunications companies. Chill support is also being integrated
8125into the GNU compiler, but we don't know when it will be publically available.
8126
8127
8128*** Changes in GDB-4.8:
8129
8130 * HP Precision Architecture supported
8131
8132GDB now supports HP PA-RISC machines running HPUX. A preliminary
8133version of this support was available as a set of patches from the
8134University of Utah. GDB does not support debugging of programs
8135compiled with the HP compiler, because HP will not document their file
8136format. Instead, you must use GCC (version 2.3.2 or later) and PA-GAS
8137(as available from jaguar.cs.utah.edu:/dist/pa-gas.u4.tar.Z).
8138
8139Many problems in the preliminary version have been fixed.
8140
8141 * Faster and better demangling
8142
8143We have improved template demangling and fixed numerous bugs in the GNU style
8144demangler. It can now handle type modifiers such as `static' or `const'. Wide
8145character types (wchar_t) are now supported. Demangling of each symbol is now
8146only done once, and is cached when the symbol table for a file is read in.
8147This results in a small increase in memory usage for C programs, a moderate
8148increase in memory usage for C++ programs, and a fantastic speedup in
8149symbol lookups.
8150
8151`Cfront' style demangling still doesn't work with AT&T cfront. It was written
8152from the specifications in the Annotated Reference Manual, which AT&T's
8153compiler does not actually implement.
8154
8155 * G++ multiple inheritance compiler problem
8156
8157In the 2.3.2 release of gcc/g++, how the compiler resolves multiple
8158inheritance lattices was reworked to properly discover ambiguities. We
8159recently found an example which causes this new algorithm to fail in a
8160very subtle way, producing bad debug information for those classes.
8161The file 'gcc.patch' (in this directory) can be applied to gcc to
8162circumvent the problem. A future GCC release will contain a complete
8163fix.
8164
8165The previous G++ debug info problem (mentioned below for the gdb-4.7
8166release) is fixed in gcc version 2.3.2.
8167
8168 * Improved configure script
8169
8170The `configure' script will now attempt to guess your system type if
8171you don't supply a host system type. The old scheme of supplying a
8172host system triplet is preferable over using this. All the magic is
8173done in the new `config.guess' script. Examine it for details.
8174
8175We have also brought our configure script much more in line with the FSF's
8176version. It now supports the --with-xxx options. In particular,
8177`--with-minimal-bfd' can be used to make the GDB binary image smaller.
8178The resulting GDB will not be able to read arbitrary object file formats --
8179only the format ``expected'' to be used on the configured target system.
8180We hope to make this the default in a future release.
8181
8182 * Documentation improvements
8183
8184There's new internal documentation on how to modify GDB, and how to
8185produce clean changes to the code. We implore people to read it
8186before submitting changes.
8187
8188The GDB manual uses new, sexy Texinfo conditionals, rather than arcane
8189M4 macros. The new texinfo.tex is provided in this release. Pre-built
8190`info' files are also provided. To build `info' files from scratch,
8191you will need the latest `makeinfo' release, which will be available in
8192a future texinfo-X.Y release.
8193
8194*NOTE* The new texinfo.tex can cause old versions of TeX to hang.
8195We're not sure exactly which versions have this problem, but it has
8196been seen in 3.0. We highly recommend upgrading to TeX version 3.141
8197or better. If that isn't possible, there is a patch in
8198`texinfo/tex3patch' that will modify `texinfo/texinfo.tex' to work
8199around this problem.
8200
8201 * New features
8202
8203GDB now supports array constants that can be used in expressions typed in by
8204the user. The syntax is `{element, element, ...}'. Ie: you can now type
8205`print {1, 2, 3}', and it will build up an array in memory malloc'd in
8206the target program.
8207
8208The new directory `gdb/sparclite' contains a program that demonstrates
8209how the sparc-stub.c remote stub runs on a Fujitsu SPARClite processor.
8210
8211 * New native hosts supported
8212
8213HP/PA-RISC under HPUX using GNU tools hppa1.1-hp-hpux
8214386 CPUs running SCO Unix 3.2v4 i386-unknown-sco3.2v4
8215
8216 * New targets supported
8217
8218AMD 29k family via UDI a29k-amd-udi or udi29k
8219
8220 * New file formats supported
8221
8222BFD now supports reading HP/PA-RISC executables (SOM file format?),
8223HPUX core files, and SCO 3.2v2 core files.
8224
8225 * Major bug fixes
8226
8227Attaching to processes now works again; thanks for the many bug reports.
8228
8229We have also stomped on a bunch of core dumps caused by
8230printf_filtered("%s") problems.
8231
8232We eliminated a copyright problem on the rpc and ptrace header files
8233for VxWorks, which was discovered at the last minute during the 4.7
8234release. You should now be able to build a VxWorks GDB.
8235
8236You can now interrupt gdb while an attached process is running. This
8237will cause the attached process to stop, and give control back to GDB.
8238
8239We fixed problems caused by using too many file descriptors
8240for reading symbols from object files and libraries. This was
8241especially a problem for programs that used many (~100) shared
8242libraries.
8243
8244The `step' command now only enters a subroutine if there is line number
8245information for the subroutine. Otherwise it acts like the `next'
8246command. Previously, `step' would enter subroutines if there was
8247any debugging information about the routine. This avoids problems
8248when using `cc -g1' on MIPS machines.
8249
8250 * Internal improvements
8251
8252GDB's internal interfaces have been improved to make it easier to support
8253debugging of multiple languages in the future.
8254
8255GDB now uses a common structure for symbol information internally.
8256Minimal symbols (derived from linkage symbols in object files), partial
8257symbols (from a quick scan of debug information), and full symbols
8258contain a common subset of information, making it easier to write
8259shared code that handles any of them.
8260
8261 * New command line options
8262
8263We now accept --silent as an alias for --quiet.
8264
8265 * Mmalloc licensing
8266
8267The memory-mapped-malloc library is now licensed under the GNU Library
8268General Public License.
8269
8270*** Changes in GDB-4.7:
8271
8272 * Host/native/target split
8273
8274GDB has had some major internal surgery to untangle the support for
8275hosts and remote targets. Now, when you configure GDB for a remote
8276target, it will no longer load in all of the support for debugging
8277local programs on the host. When fully completed and tested, this will
8278ensure that arbitrary host/target combinations are possible.
8279
8280The primary conceptual shift is to separate the non-portable code in
8281GDB into three categories. Host specific code is required any time GDB
8282is compiled on that host, regardless of the target. Target specific
8283code relates to the peculiarities of the target, but can be compiled on
8284any host. Native specific code is everything else: it can only be
8285built when the host and target are the same system. Child process
8286handling and core file support are two common `native' examples.
8287
8288GDB's use of /proc for controlling Unix child processes is now cleaner.
8289It has been split out into a single module under the `target_ops' vector,
8290plus two native-dependent functions for each system that uses /proc.
8291
8292 * New hosts supported
8293
8294HP/Apollo 68k (under the BSD domain) m68k-apollo-bsd or apollo68bsd
8295386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
8296386 CPUs running SCO Unix i386-unknown-scosysv322 or i386sco
8297
8298 * New targets supported
8299
8300Fujitsu SPARClite sparclite-fujitsu-none or sparclite
830168030 and CPU32 m68030-*-*, m68332-*-*
8302
8303 * New native hosts supported
8304
8305386 CPUs running various BSD ports i386-unknown-bsd or 386bsd
8306 (386bsd is not well tested yet)
8307386 CPUs running SCO Unix i386-unknown-scosysv322 or sco
8308
8309 * New file formats supported
8310
8311BFD now supports COFF files for the Zilog Z8000 microprocessor. It
8312supports reading of `a.out.adobe' object files, which are an a.out
8313format extended with minimal information about multiple sections.
8314
8315 * New commands
8316
8317`show copying' is the same as the old `info copying'.
8318`show warranty' is the same as `info warrantee'.
8319These were renamed for consistency. The old commands continue to work.
8320
8321`info handle' is a new alias for `info signals'.
8322
8323You can now define pre-command hooks, which attach arbitrary command
8324scripts to any command. The commands in the hook will be executed
8325prior to the user's command. You can also create a hook which will be
8326executed whenever the program stops. See gdb.texinfo.
8327
8328 * C++ improvements
8329
8330We now deal with Cfront style name mangling, and can even extract type
8331info from mangled symbols. GDB can automatically figure out which
8332symbol mangling style your C++ compiler uses.
8333
8334Calling of methods and virtual functions has been improved as well.
8335
8336 * Major bug fixes
8337
82f06518 8338The crash that occurred when debugging Sun Ansi-C compiled binaries is
c906108c
SS
8339fixed. This was due to mishandling of the extra N_SO stabs output
8340by the compiler.
8341
8342We also finally got Ultrix 4.2 running in house, and fixed core file
8343support, with help from a dozen people on the net.
8344
8345John M. Farrell discovered that the reason that single-stepping was so
8346slow on all of the Mips based platforms (primarily SGI and DEC) was
8347that we were trying to demangle and lookup a symbol used for internal
8348purposes on every instruction that was being stepped through. Changing
8349the name of that symbol so that it couldn't be mistaken for a C++
8350mangled symbol sped things up a great deal.
8351
8352Rich Pixley sped up symbol lookups in general by getting much smarter
8353about when C++ symbol mangling is necessary. This should make symbol
8354completion (TAB on the command line) much faster. It's not as fast as
8355we'd like, but it's significantly faster than gdb-4.6.
8356
8357 * AMD 29k support
8358
8359A new user controllable variable 'call_scratch_address' can
8360specify the location of a scratch area to be used when GDB
8361calls a function in the target. This is necessary because the
8362usual method of putting the scratch area on the stack does not work
8363in systems that have separate instruction and data spaces.
8364
8365We integrated changes to support the 29k UDI (Universal Debugger
8366Interface), but discovered at the last minute that we didn't have all
8367of the appropriate copyright paperwork. We are working with AMD to
8368resolve this, and hope to have it available soon.
8369
8370 * Remote interfaces
8371
8372We have sped up the remote serial line protocol, especially for targets
8373with lots of registers. It now supports a new `expedited status' ('T')
8374message which can be used in place of the existing 'S' status message.
8375This allows the remote stub to send only the registers that GDB
8376needs to make a quick decision about single-stepping or conditional
8377breakpoints, eliminating the need to fetch the entire register set for
8378each instruction being stepped through.
8379
8380The GDB remote serial protocol now implements a write-through cache for
8381registers, only re-reading the registers if the target has run.
8382
8383There is also a new remote serial stub for SPARC processors. You can
8384find it in gdb-4.7/gdb/sparc-stub.c. This was written to support the
8385Fujitsu SPARClite processor, but will run on any stand-alone SPARC
8386processor with a serial port.
8387
8388 * Configuration
8389
8390Configure.in files have become much easier to read and modify. A new
8391`table driven' format makes it more obvious what configurations are
8392supported, and what files each one uses.
8393
8394 * Library changes
8395
8396There is a new opcodes library which will eventually contain all of the
8397disassembly routines and opcode tables. At present, it only contains
8398Sparc and Z8000 routines. This will allow the assembler, debugger, and
8399disassembler (binutils/objdump) to share these routines.
8400
8401The libiberty library is now copylefted under the GNU Library General
8402Public License. This allows more liberal use, and was done so libg++
8403can use it. This makes no difference to GDB, since the Library License
8404grants all the rights from the General Public License.
8405
8406 * Documentation
8407
8408The file gdb-4.7/gdb/doc/stabs.texinfo is a (relatively) complete
8409reference to the stabs symbol info used by the debugger. It is (as far
8410as we know) the only published document on this fascinating topic. We
8411encourage you to read it, compare it to the stabs information on your
8412system, and send improvements on the document in general (to
8413bug-gdb@prep.ai.mit.edu).
8414
8415And, of course, many bugs have been fixed.
8416
8417
8418*** Changes in GDB-4.6:
8419
8420 * Better support for C++ function names
8421
8422GDB now accepts as input the "demangled form" of C++ overloaded function
8423names and member function names, and can do command completion on such names
8424(using TAB, TAB-TAB, and ESC-?). The names have to be quoted with a pair of
8425single quotes. Examples are 'func (int, long)' and 'obj::operator==(obj&)'.
8426Make use of command completion, it is your friend.
8427
8428GDB also now accepts a variety of C++ mangled symbol formats. They are
8429the GNU g++ style, the Cfront (ARM) style, and the Lucid (lcc) style.
8430You can tell GDB which format to use by doing a 'set demangle-style {gnu,
8431lucid, cfront, auto}'. 'gnu' is the default. Do a 'set demangle-style foo'
8432for the list of formats.
8433
8434 * G++ symbol mangling problem
8435
8436Recent versions of gcc have a bug in how they emit debugging information for
8437C++ methods (when using dbx-style stabs). The file 'gcc.patch' (in this
8438directory) can be applied to gcc to fix the problem. Alternatively, if you
82f06518 8439can't fix gcc, you can #define GCC_MANGLE_BUG when compiling gdb/symtab.c. The
c906108c
SS
8440usual symptom is difficulty with setting breakpoints on methods. GDB complains
8441about the method being non-existent. (We believe that version 2.2.2 of GCC has
8442this problem.)
8443
8444 * New 'maintenance' command
8445
8446All of the commands related to hacking GDB internals have been moved out of
8447the main command set, and now live behind the 'maintenance' command. This
8448can also be abbreviated as 'mt'. The following changes were made:
8449
8450 dump-me -> maintenance dump-me
8451 info all-breakpoints -> maintenance info breakpoints
8452 printmsyms -> maintenance print msyms
8453 printobjfiles -> maintenance print objfiles
8454 printpsyms -> maintenance print psymbols
8455 printsyms -> maintenance print symbols
8456
8457The following commands are new:
8458
8459 maintenance demangle Call internal GDB demangler routine to
8460 demangle a C++ link name and prints the result.
8461 maintenance print type Print a type chain for a given symbol
8462
8463 * Change to .gdbinit file processing
8464
8465We now read the $HOME/.gdbinit file before processing the argv arguments
8466(e.g. reading symbol files or core files). This allows global parameters to
8467be set, which will apply during the symbol reading. The ./.gdbinit is still
8468read after argv processing.
8469
8470 * New hosts supported
8471
8472Solaris-2.0 !!! sparc-sun-solaris2 or sun4sol2
8473
55241689 8474GNU/Linux support i386-unknown-linux or linux
c906108c
SS
8475
8476We are also including code to support the HP/PA running BSD and HPUX. This
8477is almost guaranteed not to work, as we didn't have time to test or build it
8478for this release. We are including it so that the more adventurous (or
8479masochistic) of you can play with it. We also had major problems with the
8480fact that the compiler that we got from HP doesn't support the -g option.
8481It costs extra.
8482
8483 * New targets supported
8484
8485Hitachi H8/300 h8300-hitachi-hms or h8300hms
8486
8487 * More smarts about finding #include files
8488
8489GDB now remembers the compilation directory for all include files, and for
8490all files from which C is generated (like yacc and lex sources). This
8491greatly improves GDB's ability to find yacc/lex sources, and include files,
8492especially if you are debugging your program from a directory different from
8493the one that contains your sources.
8494
8495We also fixed a bug which caused difficulty with listing and setting
8496breakpoints in include files which contain C code. (In the past, you had to
8497try twice in order to list an include file that you hadn't looked at before.)
8498
8499 * Interesting infernals change
8500
8501GDB now deals with arbitrary numbers of sections, where the symbols for each
8502section must be relocated relative to that section's landing place in the
8503target's address space. This work was needed to support ELF with embedded
8504stabs used by Solaris-2.0.
8505
8506 * Bug fixes (of course!)
8507
8508There have been loads of fixes for the following things:
8509 mips, rs6000, 29k/udi, m68k, g++, type handling, elf/dwarf, m88k,
8510 i960, stabs, DOS(GO32), procfs, etc...
8511
8512See the ChangeLog for details.
8513
8514*** Changes in GDB-4.5:
8515
8516 * New machines supported (host and target)
8517
8518IBM RS6000 running AIX rs6000-ibm-aix or rs6000
8519
8520SGI Irix-4.x mips-sgi-irix4 or iris4
8521
8522 * New malloc package
8523
8524GDB now uses a new memory manager called mmalloc, based on gmalloc.
82f06518 8525Mmalloc is capable of handling multiple heaps of memory. It is also
c906108c
SS
8526capable of saving a heap to a file, and then mapping it back in later.
8527This can be used to greatly speedup the startup of GDB by using a
8528pre-parsed symbol table which lives in a mmalloc managed heap. For
8529more details, please read mmalloc/mmalloc.texi.
8530
8531 * info proc
8532
8533The 'info proc' command (SVR4 only) has been enhanced quite a bit. See
8534'help info proc' for details.
8535
8536 * MIPS ecoff symbol table format
8537
8538The code that reads MIPS symbol table format is now supported on all hosts.
8539Thanks to MIPS for releasing the sym.h and symconst.h files to make this
8540possible.
8541
8542 * File name changes for MS-DOS
8543
8544Many files in the config directories have been renamed to make it easier to
8545support GDB on MS-DOSe systems (which have very restrictive file name
8546conventions :-( ). MS-DOSe host support (under DJ Delorie's GO32
8547environment) is close to working but has some remaining problems. Note
8548that debugging of DOS programs is not supported, due to limitations
8549in the ``operating system'', but it can be used to host cross-debugging.
8550
8551 * Cross byte order fixes
8552
8553Many fixes have been made to support cross debugging of Sparc and MIPS
8554targets from hosts whose byte order differs.
8555
8556 * New -mapped and -readnow options
8557
8558If memory-mapped files are available on your system through the 'mmap'
8559system call, you can use the -mapped option on the `file' or
8560`symbol-file' commands to cause GDB to write the symbols from your
8561program into a reusable file. If the program you are debugging is
8562called `/path/fred', the mapped symbol file will be `./fred.syms'.
8563Future GDB debugging sessions will notice the presence of this file,
8564and will quickly map in symbol information from it, rather than reading
8565the symbol table from the executable program. Using the '-mapped'
8566option in a GDB `file' or `symbol-file' command has the same effect as
8567starting GDB with the '-mapped' command-line option.
8568
8569You can cause GDB to read the entire symbol table immediately by using
8570the '-readnow' option with any of the commands that load symbol table
8571information (or on the GDB command line). This makes the command
8572slower, but makes future operations faster.
8573
8574The -mapped and -readnow options are typically combined in order to
8575build a `fred.syms' file that contains complete symbol information.
8576A simple GDB invocation to do nothing but build a `.syms' file for future
8577use is:
8578
8579 gdb -batch -nx -mapped -readnow programname
8580
8581The `.syms' file is specific to the host machine on which GDB is run.
8582It holds an exact image of GDB's internal symbol table. It cannot be
8583shared across multiple host platforms.
8584
8585 * longjmp() handling
8586
8587GDB is now capable of stepping and nexting over longjmp(), _longjmp(), and
8588siglongjmp() without losing control. This feature has not yet been ported to
8589all systems. It currently works on many 386 platforms, all MIPS-based
8590platforms (SGI, DECstation, etc), and Sun3/4.
8591
8592 * Solaris 2.0
8593
8594Preliminary work has been put in to support the new Solaris OS from Sun. At
8595this time, it can control and debug processes, but it is not capable of
8596reading symbols.
8597
8598 * Bug fixes
8599
8600As always, many many bug fixes. The major areas were with g++, and mipsread.
8601People using the MIPS-based platforms should experience fewer mysterious
8602crashes and trashed symbol tables.
8603
8604*** Changes in GDB-4.4:
8605
8606 * New machines supported (host and target)
8607
8608SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
8609 (except core files)
8610BSD Reno on Vax vax-dec-bsd
8611Ultrix on Vax vax-dec-ultrix
8612
8613 * New machines supported (target)
8614
8615AMD 29000 embedded, using EBMON a29k-none-none
8616
8617 * C++ support
8618
8619GDB continues to improve its handling of C++. `References' work better.
8620The demangler has also been improved, and now deals with symbols mangled as
8621per the Annotated C++ Reference Guide.
8622
8623GDB also now handles `stabs' symbol information embedded in MIPS
8624`ecoff' symbol tables. Since the ecoff format was not easily
8625extensible to handle new languages such as C++, this appeared to be a
8626good way to put C++ debugging info into MIPS binaries. This option
8627will be supported in the GNU C compiler, version 2, when it is
8628released.
8629
8630 * New features for SVR4
8631
8632GDB now handles SVR4 shared libraries, in the same fashion as SunOS
8633shared libraries. Debugging dynamically linked programs should present
8634only minor differences from debugging statically linked programs.
8635
8636The `info proc' command will print out information about any process
8637on an SVR4 system (including the one you are debugging). At the moment,
8638it prints the address mappings of the process.
8639
8640If you bring up GDB on another SVR4 system, please send mail to
8641bug-gdb@prep.ai.mit.edu to let us know what changes were reqired (if any).
8642
8643 * Better dynamic linking support in SunOS
8644
8645Reading symbols from shared libraries which contain debugging symbols
8646now works properly. However, there remain issues such as automatic
8647skipping of `transfer vector' code during function calls, which
8648make it harder to debug code in a shared library, than to debug the
8649same code linked statically.
8650
8651 * New Getopt
8652
8653GDB is now using the latest `getopt' routines from the FSF. This
8654version accepts the -- prefix for options with long names. GDB will
8655continue to accept the old forms (-option and +option) as well.
8656Various single letter abbreviations for options have been explicity
8657added to the option table so that they won't get overshadowed in the
8658future by other options that begin with the same letter.
8659
8660 * Bugs fixed
8661
8662The `cleanup_undefined_types' bug that many of you noticed has been squashed.
8663Many assorted bugs have been handled. Many more remain to be handled.
8664See the various ChangeLog files (primarily in gdb and bfd) for details.
8665
8666
8667*** Changes in GDB-4.3:
8668
8669 * New machines supported (host and target)
8670
8671Amiga 3000 running Amix m68k-cbm-svr4 or amix
8672NCR 3000 386 running SVR4 i386-ncr-svr4 or ncr3000
8673Motorola Delta 88000 running Sys V m88k-motorola-sysv or delta88
8674
8675 * Almost SCO Unix support
8676
8677We had hoped to support:
8678SCO Unix on i386 IBM PC clones i386-sco-sysv or i386sco
8679(except for core file support), but we discovered very late in the release
8680that it has problems with process groups that render gdb unusable. Sorry
8681about that. I encourage people to fix it and post the fixes.
8682
8683 * Preliminary ELF and DWARF support
8684
8685GDB can read ELF object files on System V Release 4, and can handle
8686debugging records for C, in DWARF format, in ELF files. This support
8687is preliminary. If you bring up GDB on another SVR4 system, please
8688send mail to bug-gdb@prep.ai.mit.edu to let us know what changes were
8689reqired (if any).
8690
8691 * New Readline
8692
8693GDB now uses the latest `readline' library. One user-visible change
8694is that two tabs will list possible command completions, which previously
8695required typing M-? (meta-question mark, or ESC ?).
8696
8697 * Bugs fixed
8698
8699The `stepi' bug that many of you noticed has been squashed.
8700Many bugs in C++ have been handled. Many more remain to be handled.
8701See the various ChangeLog files (primarily in gdb and bfd) for details.
8702
8703 * State of the MIPS world (in case you wondered):
8704
8705GDB can understand the symbol tables emitted by the compilers
8706supplied by most vendors of MIPS-based machines, including DEC. These
8707symbol tables are in a format that essentially nobody else uses.
8708
8709Some versions of gcc come with an assembler post-processor called
8710mips-tfile. This program is required if you want to do source-level
8711debugging of gcc-compiled programs. I believe FSF does not ship
8712mips-tfile with gcc version 1, but it will eventually come with gcc
8713version 2.
8714
8715Debugging of g++ output remains a problem. g++ version 1.xx does not
8716really support it at all. (If you're lucky, you should be able to get
8717line numbers and stack traces to work, but no parameters or local
8718variables.) With some work it should be possible to improve the
8719situation somewhat.
8720
8721When gcc version 2 is released, you will have somewhat better luck.
8722However, even then you will get confusing results for inheritance and
8723methods.
8724
8725We will eventually provide full debugging of g++ output on
8726DECstations. This will probably involve some kind of stabs-in-ecoff
8727encapulation, but the details have not been worked out yet.
8728
8729
8730*** Changes in GDB-4.2:
8731
8732 * Improved configuration
8733
8734Only one copy of `configure' exists now, and it is not self-modifying.
8735Porting BFD is simpler.
8736
8737 * Stepping improved
8738
8739The `step' and `next' commands now only stop at the first instruction
8740of a source line. This prevents the multiple stops that used to occur
8741in switch statements, for-loops, etc. `Step' continues to stop if a
8742function that has debugging information is called within the line.
8743
8744 * Bug fixing
8745
8746Lots of small bugs fixed. More remain.
8747
8748 * New host supported (not target)
8749
8750Intel 386 PC clone running Mach i386-none-mach
8751
8752
8753*** Changes in GDB-4.1:
8754
8755 * Multiple source language support
8756
8757GDB now has internal scaffolding to handle several source languages.
8758It determines the type of each source file from its filename extension,
8759and will switch expression parsing and number formatting to match the
8760language of the function in the currently selected stack frame.
8761You can also specifically set the language to be used, with
8762`set language c' or `set language modula-2'.
8763
8764 * GDB and Modula-2
8765
8766GDB now has preliminary support for the GNU Modula-2 compiler,
8767currently under development at the State University of New York at
8768Buffalo. Development of both GDB and the GNU Modula-2 compiler will
8769continue through the fall of 1991 and into 1992.
8770
8771Other Modula-2 compilers are currently not supported, and attempting to
8772debug programs compiled with them will likely result in an error as the
8773symbol table is read. Feel free to work on it, though!
8774
8775There are hooks in GDB for strict type checking and range checking,
8776in the `Modula-2 philosophy', but they do not currently work.
8777
8778 * set write on/off
8779
8780GDB can now write to executable and core files (e.g. patch
8781a variable's value). You must turn this switch on, specify
8782the file ("exec foo" or "core foo"), *then* modify it, e.g.
8783by assigning a new value to a variable. Modifications take
8784effect immediately.
8785
8786 * Automatic SunOS shared library reading
8787
8788When you run your program, GDB automatically determines where its
8789shared libraries (if any) have been loaded, and reads their symbols.
8790The `share' command is no longer needed. This also works when
8791examining core files.
8792
8793 * set listsize
8794
8795You can specify the number of lines that the `list' command shows.
8796The default is 10.
8797
8798 * New machines supported (host and target)
8799
8800SGI Iris (MIPS) running Irix V3: mips-sgi-irix or iris
8801Sony NEWS (68K) running NEWSOS 3.x: m68k-sony-sysv or news
8802Ultracomputer (29K) running Sym1: a29k-nyu-sym1 or ultra3
8803
8804 * New hosts supported (not targets)
8805
8806IBM RT/PC: romp-ibm-aix or rtpc
8807
8808 * New targets supported (not hosts)
8809
8810AMD 29000 embedded with COFF a29k-none-coff
8811AMD 29000 embedded with a.out a29k-none-aout
8812Ultracomputer remote kernel debug a29k-nyu-kern
8813
8814 * New remote interfaces
8815
8816AMD 29000 Adapt
8817AMD 29000 Minimon
8818
8819
8820*** Changes in GDB-4.0:
8821
8822 * New Facilities
8823
8824Wide output is wrapped at good places to make the output more readable.
8825
8826Gdb now supports cross-debugging from a host machine of one type to a
8827target machine of another type. Communication with the target system
8828is over serial lines. The ``target'' command handles connecting to the
8829remote system; the ``load'' command will download a program into the
8830remote system. Serial stubs for the m68k and i386 are provided. Gdb
8831also supports debugging of realtime processes running under VxWorks,
8832using SunRPC Remote Procedure Calls over TCP/IP to talk to a debugger
8833stub on the target system.
8834
8835New CPUs supported include the AMD 29000 and Intel 960.
8836
8837GDB now reads object files and symbol tables via a ``binary file''
8838library, which allows a single copy of GDB to debug programs of multiple
8839object file types such as a.out and coff.
8840
8841There is now a GDB reference card in "doc/refcard.tex". (Make targets
8842refcard.dvi and refcard.ps are available to format it).
8843
8844
8845 * Control-Variable user interface simplified
8846
8847All variables that control the operation of the debugger can be set
8848by the ``set'' command, and displayed by the ``show'' command.
8849
8850For example, ``set prompt new-gdb=>'' will change your prompt to new-gdb=>.
8851``Show prompt'' produces the response:
8852Gdb's prompt is new-gdb=>.
8853
8854What follows are the NEW set commands. The command ``help set'' will
8855print a complete list of old and new set commands. ``help set FOO''
8856will give a longer description of the variable FOO. ``show'' will show
8857all of the variable descriptions and their current settings.
8858
8859confirm on/off: Enables warning questions for operations that are
8860 hard to recover from, e.g. rerunning the program while
8861 it is already running. Default is ON.
8862
8863editing on/off: Enables EMACS style command line editing
8864 of input. Previous lines can be recalled with
8865 control-P, the current line can be edited with control-B,
8866 you can search for commands with control-R, etc.
8867 Default is ON.
8868
8869history filename NAME: NAME is where the gdb command history
8870 will be stored. The default is .gdb_history,
8871 or the value of the environment variable
8872 GDBHISTFILE.
8873
8874history size N: The size, in commands, of the command history. The
8875 default is 256, or the value of the environment variable
8876 HISTSIZE.
8877
8878history save on/off: If this value is set to ON, the history file will
8879 be saved after exiting gdb. If set to OFF, the
8880 file will not be saved. The default is OFF.
8881
8882history expansion on/off: If this value is set to ON, then csh-like
8883 history expansion will be performed on
8884 command line input. The default is OFF.
8885
8886radix N: Sets the default radix for input and output. It can be set
8887 to 8, 10, or 16. Note that the argument to "radix" is interpreted
8888 in the current radix, so "set radix 10" is always a no-op.
8889
8890height N: This integer value is the number of lines on a page. Default
8891 is 24, the current `stty rows'' setting, or the ``li#''
8892 setting from the termcap entry matching the environment
8893 variable TERM.
8894
8895width N: This integer value is the number of characters on a line.
8896 Default is 80, the current `stty cols'' setting, or the ``co#''
8897 setting from the termcap entry matching the environment
8898 variable TERM.
8899
8900Note: ``set screensize'' is obsolete. Use ``set height'' and
8901``set width'' instead.
8902
8903print address on/off: Print memory addresses in various command displays,
8904 such as stack traces and structure values. Gdb looks
8905 more ``symbolic'' if you turn this off; it looks more
8906 ``machine level'' with it on. Default is ON.
8907
8908print array on/off: Prettyprint arrays. New convenient format! Default
8909 is OFF.
8910
8911print demangle on/off: Print C++ symbols in "source" form if on,
8912 "raw" form if off.
8913
8914print asm-demangle on/off: Same, for assembler level printouts
8915 like instructions.
8916
8917print vtbl on/off: Prettyprint C++ virtual function tables. Default is OFF.
8918
8919
8920 * Support for Epoch Environment.
8921
8922The epoch environment is a version of Emacs v18 with windowing. One
8923new command, ``inspect'', is identical to ``print'', except that if you
8924are running in the epoch environment, the value is printed in its own
8925window.
8926
8927
8928 * Support for Shared Libraries
8929
8930GDB can now debug programs and core files that use SunOS shared libraries.
8931Symbols from a shared library cannot be referenced
8932before the shared library has been linked with the program (this
8933happens after you type ``run'' and before the function main() is entered).
8934At any time after this linking (including when examining core files
8935from dynamically linked programs), gdb reads the symbols from each
8936shared library when you type the ``sharedlibrary'' command.
8937It can be abbreviated ``share''.
8938
8939sharedlibrary REGEXP: Load shared object library symbols for files
8940 matching a unix regular expression. No argument
8941 indicates to load symbols for all shared libraries.
8942
8943info sharedlibrary: Status of loaded shared libraries.
8944
8945
8946 * Watchpoints
8947
8948A watchpoint stops execution of a program whenever the value of an
8949expression changes. Checking for this slows down execution
8950tremendously whenever you are in the scope of the expression, but is
8951quite useful for catching tough ``bit-spreader'' or pointer misuse
8952problems. Some machines such as the 386 have hardware for doing this
8953more quickly, and future versions of gdb will use this hardware.
8954
8955watch EXP: Set a watchpoint (breakpoint) for an expression.
8956
8957info watchpoints: Information about your watchpoints.
8958
8959delete N: Deletes watchpoint number N (same as breakpoints).
8960disable N: Temporarily turns off watchpoint number N (same as breakpoints).
8961enable N: Re-enables watchpoint number N (same as breakpoints).
8962
8963
8964 * C++ multiple inheritance
8965
8966When used with a GCC version 2 compiler, GDB supports multiple inheritance
8967for C++ programs.
8968
8969 * C++ exception handling
8970
8971Gdb now supports limited C++ exception handling. Besides the existing
8972ability to breakpoint on an exception handler, gdb can breakpoint on
8973the raising of an exception (before the stack is peeled back to the
8974handler's context).
8975
8976catch FOO: If there is a FOO exception handler in the dynamic scope,
8977 set a breakpoint to catch exceptions which may be raised there.
8978 Multiple exceptions (``catch foo bar baz'') may be caught.
8979
8980info catch: Lists all exceptions which may be caught in the
8981 current stack frame.
8982
8983
8984 * Minor command changes
8985
8986The command ``call func (arg, arg, ...)'' now acts like the print
8987command, except it does not print or save a value if the function's result
8988is void. This is similar to dbx usage.
8989
8990The ``up'' and ``down'' commands now always print the frame they end up
8991at; ``up-silently'' and `down-silently'' can be used in scripts to change
8992frames without printing.
8993
8994 * New directory command
8995
8996'dir' now adds directories to the FRONT of the source search path.
8997The path starts off empty. Source files that contain debug information
8998about the directory in which they were compiled can be found even
8999with an empty path; Sun CC and GCC include this information. If GDB can't
9000find your source file in the current directory, type "dir .".
9001
9002 * Configuring GDB for compilation
9003
9004For normal use, type ``./configure host''. See README or gdb.texinfo
9005for more details.
9006
9007GDB now handles cross debugging. If you are remotely debugging between
9008two different machines, type ``./configure host -target=targ''.
9009Host is the machine where GDB will run; targ is the machine
9010where the program that you are debugging will run.