forked from Imagelibrary/binutils-gdb
[gdb/contrib] Add two rules in common-misspellings.txt
Eli mentioned [1] that given that we use US English spelling in our documentation, we should use "behavior" instead of "behaviour". In wikipedia-common-misspellings.txt there's a rule: ... behavour->behavior, behaviour ... which leaves this as a choice. Add an overriding rule to hardcode the choice to common-misspellings.txt: ... behavour->behavior ... and add a rule to rewrite behaviour into behavior: ... behaviour->behavior ... and re-run spellcheck.sh on gdb*. Tested on x86_64-linux. [1] https://sourceware.org/pipermail/gdb-patches/2024-November/213371.html
This commit is contained in:
8
gdb/NEWS
8
gdb/NEWS
@@ -605,7 +605,7 @@ show tui mouse-events
|
|||||||
changed.
|
changed.
|
||||||
|
|
||||||
** New methods added to the gdb.PendingFrame class. These methods
|
** New methods added to the gdb.PendingFrame class. These methods
|
||||||
have the same behaviour as the corresponding methods on
|
have the same behavior as the corresponding methods on
|
||||||
gdb.Frame. The new methods are:
|
gdb.Frame. The new methods are:
|
||||||
|
|
||||||
- gdb.PendingFrame.name: Return the name for the frame's
|
- gdb.PendingFrame.name: Return the name for the frame's
|
||||||
@@ -1231,7 +1231,7 @@ winheight
|
|||||||
* MI changes
|
* MI changes
|
||||||
|
|
||||||
** The '-add-inferior' with no option flags now inherits the
|
** The '-add-inferior' with no option flags now inherits the
|
||||||
connection of the current inferior, this restores the behaviour of
|
connection of the current inferior, this restores the behavior of
|
||||||
GDB as it was prior to GDB 10.
|
GDB as it was prior to GDB 10.
|
||||||
|
|
||||||
** The '-add-inferior' command now accepts a '--no-connection'
|
** The '-add-inferior' command now accepts a '--no-connection'
|
||||||
@@ -2012,7 +2012,7 @@ set print frame-info [short-location|location|location-and-address
|
|||||||
|source-and-location|source-line|auto]
|
|source-and-location|source-line|auto]
|
||||||
show print frame-info
|
show print frame-info
|
||||||
This controls what frame information is printed by the commands printing
|
This controls what frame information is printed by the commands printing
|
||||||
a frame. This setting will e.g. influence the behaviour of 'backtrace',
|
a frame. This setting will e.g. influence the behavior of 'backtrace',
|
||||||
'frame', 'stepi'. The python frame filtering also respect this setting.
|
'frame', 'stepi'. The python frame filtering also respect this setting.
|
||||||
The 'backtrace' '-frame-info' option can override this global setting.
|
The 'backtrace' '-frame-info' option can override this global setting.
|
||||||
|
|
||||||
@@ -8098,7 +8098,7 @@ full 64-bit address. The command
|
|||||||
|
|
||||||
set remoteaddresssize 32
|
set remoteaddresssize 32
|
||||||
|
|
||||||
can be used to revert to the old behaviour. For existing remote stubs
|
can be used to revert to the old behavior. For existing remote stubs
|
||||||
the change should not be noticed, as the additional address information
|
the change should not be noticed, as the additional address information
|
||||||
will be discarded.
|
will be discarded.
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ What Is Not A Security Bug
|
|||||||
It is possible for a program to detect when it is run under GDB and
|
It is possible for a program to detect when it is run under GDB and
|
||||||
to change its behavior so that unwanted behavior may only appear
|
to change its behavior so that unwanted behavior may only appear
|
||||||
when a program is run under GDB. Any issues that arise due to an
|
when a program is run under GDB. Any issues that arise due to an
|
||||||
untrusted program detecting GDB and changing its behaviour are not
|
untrusted program detecting GDB and changing its behavior are not
|
||||||
security issues in GDB unless the issue also meet some other
|
security issues in GDB unless the issue also meet some other
|
||||||
definition of a security bug.
|
definition of a security bug.
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ Security Realities Of The GDB Project
|
|||||||
|
|
||||||
There are known bugs in GDB related to loading malformed executables
|
There are known bugs in GDB related to loading malformed executables
|
||||||
and parsing the debug information, a consequence of these bugs is
|
and parsing the debug information, a consequence of these bugs is
|
||||||
that a malicious program could trigger undefined behaviour in GDB,
|
that a malicious program could trigger undefined behavior in GDB,
|
||||||
which could be used to trigger arbitrary code execution.
|
which could be used to trigger arbitrary code execution.
|
||||||
|
|
||||||
Given these risks, the advice of the GDB project is that, when using
|
Given these risks, the advice of the GDB project is that, when using
|
||||||
@@ -199,7 +199,7 @@ Security Realities Of The GDB Project
|
|||||||
environment.
|
environment.
|
||||||
|
|
||||||
As there are already known bugs in GDB relating to undefined
|
As there are already known bugs in GDB relating to undefined
|
||||||
behaviour triggered from malformed programs, further bugs in this
|
behavior triggered from malformed programs, further bugs in this
|
||||||
area should still be reported, but are unlikely to be given high
|
area should still be reported, but are unlikely to be given high
|
||||||
priority. Bugs in GDB that are triggered by well-formed programs
|
priority. Bugs in GDB that are triggered by well-formed programs
|
||||||
should also be reported, and are likely to be treated as higher
|
should also be reported, and are likely to be treated as higher
|
||||||
|
|||||||
@@ -2584,7 +2584,7 @@ aarch64_extract_return_value (struct type *type, struct regcache *regs,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* For a structure or union the behaviour is as if the value had
|
/* For a structure or union the behavior is as if the value had
|
||||||
been stored to word-aligned memory and then loaded into
|
been stored to word-aligned memory and then loaded into
|
||||||
registers with 64-bit load instruction(s). */
|
registers with 64-bit load instruction(s). */
|
||||||
int len = type->length ();
|
int len = type->length ();
|
||||||
@@ -2710,7 +2710,7 @@ aarch64_store_return_value (struct type *type, struct regcache *regs,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* For a structure or union the behaviour is as if the value had
|
/* For a structure or union the behavior is as if the value had
|
||||||
been stored to word-aligned memory and then loaded into
|
been stored to word-aligned memory and then loaded into
|
||||||
registers with 64-bit load instruction(s). */
|
registers with 64-bit load instruction(s). */
|
||||||
int len = type->length ();
|
int len = type->length ();
|
||||||
|
|||||||
@@ -1714,7 +1714,7 @@ amd64_displaced_step_fixup (struct gdbarch *gdbarch,
|
|||||||
CORE_ADDR rip = pc - insn_offset;
|
CORE_ADDR rip = pc - insn_offset;
|
||||||
|
|
||||||
/* If we just stepped over a breakpoint insn, we don't backup
|
/* If we just stepped over a breakpoint insn, we don't backup
|
||||||
the pc on purpose; this is to match behaviour without
|
the pc on purpose; this is to match behavior without
|
||||||
stepping. */
|
stepping. */
|
||||||
|
|
||||||
regcache_write_pc (regs, rip);
|
regcache_write_pc (regs, rip);
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ struct annotate_arg_emitter
|
|||||||
are on, we only sometimes print the annotation, and only sometimes
|
are on, we only sometimes print the annotation, and only sometimes
|
||||||
update the current symtab and line. However, this particular annotation
|
update the current symtab and line. However, this particular annotation
|
||||||
has behaved this way for some time, and front ends that still use
|
has behaved this way for some time, and front ends that still use
|
||||||
annotations now depend on this behaviour. */
|
annotations now depend on this behavior. */
|
||||||
extern bool annotate_source_line (struct symtab *s, int line,
|
extern bool annotate_source_line (struct symtab *s, int line,
|
||||||
int mid_statement, CORE_ADDR pc);
|
int mid_statement, CORE_ADDR pc);
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ legacy_register_sim_regno (struct gdbarch *gdbarch, int regnum)
|
|||||||
gdb_assert (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch));
|
gdb_assert (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch));
|
||||||
/* NOTE: cagney/2002-05-13: The old code did it this way and it is
|
/* NOTE: cagney/2002-05-13: The old code did it this way and it is
|
||||||
suspected that some GDB/SIM combinations may rely on this
|
suspected that some GDB/SIM combinations may rely on this
|
||||||
behaviour. The default should be one2one_register_sim_regno
|
behavior. The default should be one2one_register_sim_regno
|
||||||
(below). */
|
(below). */
|
||||||
if (gdbarch_register_name (gdbarch, regnum)[0] != '\0')
|
if (gdbarch_register_name (gdbarch, regnum)[0] != '\0')
|
||||||
return regnum;
|
return regnum;
|
||||||
|
|||||||
@@ -588,7 +588,7 @@ static CORE_ADDR arm_analyze_prologue
|
|||||||
(struct gdbarch *gdbarch, CORE_ADDR prologue_start, CORE_ADDR prologue_end,
|
(struct gdbarch *gdbarch, CORE_ADDR prologue_start, CORE_ADDR prologue_end,
|
||||||
struct arm_prologue_cache *cache, const arm_instruction_reader &insn_reader);
|
struct arm_prologue_cache *cache, const arm_instruction_reader &insn_reader);
|
||||||
|
|
||||||
/* Architecture version for displaced stepping. This effects the behaviour of
|
/* Architecture version for displaced stepping. This effects the behavior of
|
||||||
certain instructions, and really should not be hard-wired. */
|
certain instructions, and really should not be hard-wired. */
|
||||||
|
|
||||||
#define DISPLACED_STEPPING_ARCH_VERSION 5
|
#define DISPLACED_STEPPING_ARCH_VERSION 5
|
||||||
@@ -5574,7 +5574,7 @@ bx_write_pc (struct regcache *regs, ULONGEST val)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Unpredictable behaviour. Try to do something sensible (switch to ARM
|
/* Unpredictable behavior. Try to do something sensible (switch to ARM
|
||||||
mode, align dest to 4 bytes). */
|
mode, align dest to 4 bytes). */
|
||||||
warning (_("Single-stepping BX to non-word-aligned ARM instruction."));
|
warning (_("Single-stepping BX to non-word-aligned ARM instruction."));
|
||||||
regcache_cooked_write_unsigned (regs, ARM_PS_REGNUM, ps & ~t_bit);
|
regcache_cooked_write_unsigned (regs, ARM_PS_REGNUM, ps & ~t_bit);
|
||||||
@@ -8776,7 +8776,7 @@ gdb_print_insn_arm (bfd_vma memaddr, disassemble_info *info)
|
|||||||
undefined instruction trap. ARM7TDMI is nominally ARMv4T, but does
|
undefined instruction trap. ARM7TDMI is nominally ARMv4T, but does
|
||||||
not in fact add the new instructions. The new undefined
|
not in fact add the new instructions. The new undefined
|
||||||
instructions in ARMv4 are all instructions that had no defined
|
instructions in ARMv4 are all instructions that had no defined
|
||||||
behaviour in earlier chips. There is no guarantee that they will
|
behavior in earlier chips. There is no guarantee that they will
|
||||||
raise an exception, but may be treated as NOP's. In practice, it
|
raise an exception, but may be treated as NOP's. In practice, it
|
||||||
may only safe to rely on instructions matching:
|
may only safe to rely on instructions matching:
|
||||||
|
|
||||||
@@ -8983,7 +8983,7 @@ arm_extract_return_value (struct type *type, struct regcache *regs,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* For a structure or union the behaviour is as if the value had
|
/* For a structure or union the behavior is as if the value had
|
||||||
been stored to word-aligned memory and then loaded into
|
been stored to word-aligned memory and then loaded into
|
||||||
registers with 32-bit load instruction(s). */
|
registers with 32-bit load instruction(s). */
|
||||||
int len = type->length ();
|
int len = type->length ();
|
||||||
@@ -9058,7 +9058,7 @@ arm_return_in_memory (struct gdbarch *gdbarch, struct type *type)
|
|||||||
fields are not addressable, and all addressable subfields of
|
fields are not addressable, and all addressable subfields of
|
||||||
unions always start at offset zero.
|
unions always start at offset zero.
|
||||||
|
|
||||||
This function is based on the behaviour of GCC 2.95.1.
|
This function is based on the behavior of GCC 2.95.1.
|
||||||
See: gcc/arm.c: arm_return_in_memory() for details.
|
See: gcc/arm.c: arm_return_in_memory() for details.
|
||||||
|
|
||||||
Note: All versions of GCC before GCC 2.95.2 do not set up the
|
Note: All versions of GCC before GCC 2.95.2 do not set up the
|
||||||
@@ -9213,7 +9213,7 @@ arm_store_return_value (struct type *type, struct regcache *regs,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* For a structure or union the behaviour is as if the value had
|
/* For a structure or union the behavior is as if the value had
|
||||||
been stored to word-aligned memory and then loaded into
|
been stored to word-aligned memory and then loaded into
|
||||||
registers with 32-bit load instruction(s). */
|
registers with 32-bit load instruction(s). */
|
||||||
int len = type->length ();
|
int len = type->length ();
|
||||||
|
|||||||
@@ -787,7 +787,7 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname,
|
|||||||
maybe_add_script_file (pspace_info, is_safe, debugfile, debugfile,
|
maybe_add_script_file (pspace_info, is_safe, debugfile, debugfile,
|
||||||
language);
|
language);
|
||||||
|
|
||||||
/* To preserve existing behaviour we don't check for whether the
|
/* To preserve existing behavior we don't check for whether the
|
||||||
script was already in the table, and always load it.
|
script was already in the table, and always load it.
|
||||||
It's highly unlikely that we'd ever load it twice,
|
It's highly unlikely that we'd ever load it twice,
|
||||||
and these scripts are required to be idempotent under multiple
|
and these scripts are required to be idempotent under multiple
|
||||||
|
|||||||
@@ -368,7 +368,7 @@ parse_all_tokens (const char *str)
|
|||||||
which exists for backwards compatibility reasons. Traditionally this
|
which exists for backwards compatibility reasons. Traditionally this
|
||||||
flag, if it occurred immediately after the 'if' condition, would be
|
flag, if it occurred immediately after the 'if' condition, would be
|
||||||
treated as part of the 'if' condition. When the breakpoint condition
|
treated as part of the 'if' condition. When the breakpoint condition
|
||||||
parsing code was rewritten, this behaviour was retained. */
|
parsing code was rewritten, this behavior was retained. */
|
||||||
gdb_assert (backward_results.empty ()
|
gdb_assert (backward_results.empty ()
|
||||||
|| (forward_results.back ().get_type ()
|
|| (forward_results.back ().get_type ()
|
||||||
== token::type::CONDITION));
|
== token::type::CONDITION));
|
||||||
|
|||||||
10
gdb/c-lang.c
10
gdb/c-lang.c
@@ -337,17 +337,17 @@ c_get_string (struct value *value, gdb::unique_xmalloc_ptr<gdb_byte> *buffer,
|
|||||||
addr = value_as_address (value);
|
addr = value_as_address (value);
|
||||||
|
|
||||||
/* Prior to the fix for PR 16196 read_string would ignore fetchlimit
|
/* Prior to the fix for PR 16196 read_string would ignore fetchlimit
|
||||||
if length > 0. The old "broken" behaviour is the behaviour we want:
|
if length > 0. The old "broken" behavior is the behavior we want:
|
||||||
The caller may want to fetch 100 bytes from a variable length array
|
The caller may want to fetch 100 bytes from a variable length array
|
||||||
implemented using the common idiom of having an array of length 1 at
|
implemented using the common idiom of having an array of length 1 at
|
||||||
the end of a struct. In this case we want to ignore the declared
|
the end of a struct. In this case we want to ignore the declared
|
||||||
size of the array. However, it's counterintuitive to implement that
|
size of the array. However, it's counterintuitive to implement that
|
||||||
behaviour in read_string: what does fetchlimit otherwise mean if
|
behavior in read_string: what does fetchlimit otherwise mean if
|
||||||
length > 0. Therefore we implement the behaviour we want here:
|
length > 0. Therefore we implement the behavior we want here:
|
||||||
If *length > 0, don't specify a fetchlimit. This preserves the
|
If *length > 0, don't specify a fetchlimit. This preserves the
|
||||||
previous behaviour. We could move this check above where we know
|
previous behavior. We could move this check above where we know
|
||||||
whether the array is declared with a fixed size, but we only want
|
whether the array is declared with a fixed size, but we only want
|
||||||
to apply this behaviour when calling read_string. PR 16286. */
|
to apply this behavior when calling read_string. PR 16286. */
|
||||||
if (*length > 0)
|
if (*length > 0)
|
||||||
fetchlimit = UINT_MAX;
|
fetchlimit = UINT_MAX;
|
||||||
|
|
||||||
|
|||||||
2
gdb/configure
vendored
2
gdb/configure
vendored
@@ -27961,7 +27961,7 @@ else
|
|||||||
python_prefix=
|
python_prefix=
|
||||||
fi
|
fi
|
||||||
if test ! -x "${python_prog}"; then
|
if test ! -x "${python_prog}"; then
|
||||||
# Fall back to gdb 7.0/7.1 behaviour.
|
# Fall back to gdb 7.0/7.1 behavior.
|
||||||
python_prog=missing
|
python_prog=missing
|
||||||
python_prefix=${with_python}
|
python_prefix=${with_python}
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -802,7 +802,7 @@ else
|
|||||||
python_prefix=
|
python_prefix=
|
||||||
fi
|
fi
|
||||||
if test ! -x "${python_prog}"; then
|
if test ! -x "${python_prog}"; then
|
||||||
# Fall back to gdb 7.0/7.1 behaviour.
|
# Fall back to gdb 7.0/7.1 behavior.
|
||||||
python_prog=missing
|
python_prog=missing
|
||||||
python_prefix=${with_python}
|
python_prefix=${with_python}
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
inbetween->between, in between, in-between
|
inbetween->between, in between, in-between
|
||||||
sofar->so far
|
sofar->so far
|
||||||
doens't->doesn't
|
doens't->doesn't
|
||||||
|
behavour->behavior
|
||||||
|
behaviour->behavior
|
||||||
|
|
||||||
# Identity rules.
|
# Identity rules.
|
||||||
|
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ $GDB --batch -nx -iex 'set auto-load no' \
|
|||||||
|
|
||||||
# In some situations gdb can exit without creating an index. This is
|
# In some situations gdb can exit without creating an index. This is
|
||||||
# not an error.
|
# not an error.
|
||||||
# E.g., if $file is stripped. This behaviour is akin to stripping an
|
# E.g., if $file is stripped. This behavior is akin to stripping an
|
||||||
# already stripped binary, it's a no-op.
|
# already stripped binary, it's a no-op.
|
||||||
status=0
|
status=0
|
||||||
|
|
||||||
|
|||||||
@@ -1523,7 +1523,7 @@ core_target::xfer_partial (enum target_object object, const char *annex,
|
|||||||
exactly lively, are they? On the other hand, if we don't claim
|
exactly lively, are they? On the other hand, if we don't claim
|
||||||
that each & every one is alive, then we don't get any of them
|
that each & every one is alive, then we don't get any of them
|
||||||
to appear in an "info thread" command, which is quite a useful
|
to appear in an "info thread" command, which is quite a useful
|
||||||
behaviour.
|
behavior.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
core_target::thread_alive (ptid_t ptid)
|
core_target::thread_alive (ptid_t ptid)
|
||||||
|
|||||||
@@ -4209,7 +4209,7 @@ call executes, the new target restarts. To restart the parent
|
|||||||
process, use the @code{file} command with the parent executable name
|
process, use the @code{file} command with the parent executable name
|
||||||
as its argument. By default, after an @code{exec} call executes,
|
as its argument. By default, after an @code{exec} call executes,
|
||||||
@value{GDBN} discards the symbols of the previous executable image.
|
@value{GDBN} discards the symbols of the previous executable image.
|
||||||
You can change this behaviour with the @w{@code{set follow-exec-mode}}
|
You can change this behavior with the @w{@code{set follow-exec-mode}}
|
||||||
command.
|
command.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@@ -4977,7 +4977,7 @@ breakpoints set by commands like @code{next} and @code{finish}. For
|
|||||||
breakpoints set with @code{hbreak}, @value{GDBN} will always use hardware
|
breakpoints set with @code{hbreak}, @value{GDBN} will always use hardware
|
||||||
breakpoints.
|
breakpoints.
|
||||||
|
|
||||||
You can control this automatic behaviour with the following commands:
|
You can control this automatic behavior with the following commands:
|
||||||
|
|
||||||
@kindex set breakpoint auto-hw
|
@kindex set breakpoint auto-hw
|
||||||
@kindex show breakpoint auto-hw
|
@kindex show breakpoint auto-hw
|
||||||
@@ -4998,7 +4998,7 @@ at the breakpoint address with a special instruction, which, when
|
|||||||
executed, given control to the debugger. By default, the program
|
executed, given control to the debugger. By default, the program
|
||||||
code is so modified only when the program is resumed. As soon as
|
code is so modified only when the program is resumed. As soon as
|
||||||
the program stops, @value{GDBN} restores the original instructions. This
|
the program stops, @value{GDBN} restores the original instructions. This
|
||||||
behaviour guards against leaving breakpoints inserted in the
|
behavior guards against leaving breakpoints inserted in the
|
||||||
target should gdb abrubptly disconnect. However, with slow remote
|
target should gdb abrubptly disconnect. However, with slow remote
|
||||||
targets, inserting and removing breakpoint can reduce the performance.
|
targets, inserting and removing breakpoint can reduce the performance.
|
||||||
This behavior can be controlled with the following commands::
|
This behavior can be controlled with the following commands::
|
||||||
@@ -8177,7 +8177,7 @@ are printed in execution order.
|
|||||||
It can also print mixed source+disassembly if you specify the the
|
It can also print mixed source+disassembly if you specify the the
|
||||||
@code{/m} or @code{/s} modifier, and print the raw instructions in hex
|
@code{/m} or @code{/s} modifier, and print the raw instructions in hex
|
||||||
as well as in symbolic form by specifying the @code{/r} or @code{/b}
|
as well as in symbolic form by specifying the @code{/r} or @code{/b}
|
||||||
modifier. The behaviour of the @code{/m}, @code{/s}, @code{/r}, and
|
modifier. The behavior of the @code{/m}, @code{/s}, @code{/r}, and
|
||||||
@code{/b} modifiers are the same as for the @kbd{disassemble} command
|
@code{/b} modifiers are the same as for the @kbd{disassemble} command
|
||||||
(@pxref{disassemble,,@kbd{disassemble}}).
|
(@pxref{disassemble,,@kbd{disassemble}}).
|
||||||
|
|
||||||
@@ -13805,7 +13805,7 @@ Disable @value{GDBN} from caching target memory. This is the default.
|
|||||||
@value{GDBN} can be instructed to refuse accesses to memory that is
|
@value{GDBN} can be instructed to refuse accesses to memory that is
|
||||||
not explicitly described. This can be useful if accessing such
|
not explicitly described. This can be useful if accessing such
|
||||||
regions has undesired effects for a specific target, or to provide
|
regions has undesired effects for a specific target, or to provide
|
||||||
better error checking. The following commands control this behaviour.
|
better error checking. The following commands control this behavior.
|
||||||
|
|
||||||
@table @code
|
@table @code
|
||||||
@kindex set mem inaccessible-by-default
|
@kindex set mem inaccessible-by-default
|
||||||
@@ -17593,7 +17593,7 @@ Because of a limitation in @file{libdecnumber}, the library used by @value{GDBN}
|
|||||||
to manipulate decimal floating point numbers, it is not possible to convert
|
to manipulate decimal floating point numbers, it is not possible to convert
|
||||||
(using a cast, for example) integers wider than 32-bit to decimal float.
|
(using a cast, for example) integers wider than 32-bit to decimal float.
|
||||||
|
|
||||||
In addition, in order to imitate @value{GDBN}'s behaviour with binary floating
|
In addition, in order to imitate @value{GDBN}'s behavior with binary floating
|
||||||
point computations, error checking in decimal float operations ignores
|
point computations, error checking in decimal float operations ignores
|
||||||
underflow, overflow and divide by zero exceptions.
|
underflow, overflow and divide by zero exceptions.
|
||||||
|
|
||||||
@@ -21120,7 +21120,7 @@ still ongoing, then @value{GDBN} will interrupt the program.
|
|||||||
|
|
||||||
If a function called from @value{GDBN} is interrupted by a timeout,
|
If a function called from @value{GDBN} is interrupted by a timeout,
|
||||||
then by default the inferior is left in the frame where the timeout
|
then by default the inferior is left in the frame where the timeout
|
||||||
occurred, this behaviour can be adjusted with @samp{set
|
occurred, this behavior can be adjusted with @samp{set
|
||||||
unwind-on-timeout} (@pxref{set unwind-on-timeout}).
|
unwind-on-timeout} (@pxref{set unwind-on-timeout}).
|
||||||
|
|
||||||
For targets that don't support asynchronous execution
|
For targets that don't support asynchronous execution
|
||||||
@@ -30296,7 +30296,7 @@ There are some things to be aware of, however.
|
|||||||
@subsection Python comes first
|
@subsection Python comes first
|
||||||
|
|
||||||
Python was @value{GDBN}'s first extension language, and to avoid breaking
|
Python was @value{GDBN}'s first extension language, and to avoid breaking
|
||||||
existing behaviour Python comes first. This is generally solved by the
|
existing behavior Python comes first. This is generally solved by the
|
||||||
``first one wins'' principle. @value{GDBN} maintains a list of enabled
|
``first one wins'' principle. @value{GDBN} maintains a list of enabled
|
||||||
extension languages, and when it makes a call to an extension language,
|
extension languages, and when it makes a call to an extension language,
|
||||||
(say to pretty-print a value), it tries each in turn until an extension
|
(say to pretty-print a value), it tries each in turn until an extension
|
||||||
@@ -31415,7 +31415,7 @@ if the selected thread in @value{GDBN} is supposed to be identical to the
|
|||||||
thread the frontend wants to operate on. However, getting this
|
thread the frontend wants to operate on. However, getting this
|
||||||
optimization right can be tricky. In particular, if the frontend
|
optimization right can be tricky. In particular, if the frontend
|
||||||
sends several commands to @value{GDBN}, and one of the commands changes the
|
sends several commands to @value{GDBN}, and one of the commands changes the
|
||||||
selected thread, then the behaviour of subsequent commands will
|
selected thread, then the behavior of subsequent commands will
|
||||||
change. So, a frontend should either wait for response from such
|
change. So, a frontend should either wait for response from such
|
||||||
problematic commands, or explicitly add @code{-thread-select} for
|
problematic commands, or explicitly add @code{-thread-select} for
|
||||||
all subsequent commands. No frontend is known to do this exactly
|
all subsequent commands. No frontend is known to do this exactly
|
||||||
@@ -31782,7 +31782,7 @@ details about the various output records.
|
|||||||
@cindex @sc{gdb/mi}, compatibility with CLI
|
@cindex @sc{gdb/mi}, compatibility with CLI
|
||||||
|
|
||||||
For the developers convenience CLI commands can be entered directly,
|
For the developers convenience CLI commands can be entered directly,
|
||||||
but there may be some unexpected behaviour. For example, commands
|
but there may be some unexpected behavior. For example, commands
|
||||||
that query the user will behave as if the user replied yes, breakpoint
|
that query the user will behave as if the user replied yes, breakpoint
|
||||||
command lists are not executed and some CLI commands, such as
|
command lists are not executed and some CLI commands, such as
|
||||||
@code{if}, @code{when} and @code{define}, prompt for further input with
|
@code{if}, @code{when} and @code{define}, prompt for further input with
|
||||||
@@ -31961,7 +31961,7 @@ values.
|
|||||||
@item "^running"
|
@item "^running"
|
||||||
This result record is equivalent to @samp{^done}. Historically, it
|
This result record is equivalent to @samp{^done}. Historically, it
|
||||||
was output instead of @samp{^done} if the command has resumed the
|
was output instead of @samp{^done} if the command has resumed the
|
||||||
target. This behaviour is maintained for backward compatibility, but
|
target. This behavior is maintained for backward compatibility, but
|
||||||
all frontends should treat @samp{^done} and @samp{^running}
|
all frontends should treat @samp{^done} and @samp{^running}
|
||||||
identically and rely on the @samp{*running} output record to determine
|
identically and rely on the @samp{*running} output record to determine
|
||||||
which threads are resumed.
|
which threads are resumed.
|
||||||
@@ -41702,7 +41702,7 @@ in @value{GDBN} downloading larger amounts of data.
|
|||||||
When @value{GDBN} reports an internal problem (error or warning) it
|
When @value{GDBN} reports an internal problem (error or warning) it
|
||||||
gives the user the opportunity to both quit @value{GDBN} and create a
|
gives the user the opportunity to both quit @value{GDBN} and create a
|
||||||
core file of the current @value{GDBN} session. These commands let you
|
core file of the current @value{GDBN} session. These commands let you
|
||||||
override the default behaviour for each particular @var{action},
|
override the default behavior for each particular @var{action},
|
||||||
described in the table below.
|
described in the table below.
|
||||||
|
|
||||||
@table @samp
|
@table @samp
|
||||||
@@ -47123,7 +47123,7 @@ conditions is met:
|
|||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
The user types @kbd{Ctrl-c}. The behaviour is as explained above, and the
|
The user types @kbd{Ctrl-c}. The behavior is as explained above, and the
|
||||||
@code{read}
|
@code{read}
|
||||||
system call is treated as finished.
|
system call is treated as finished.
|
||||||
|
|
||||||
|
|||||||
@@ -1180,7 +1180,7 @@ refer to, @code{False} (the default) if they shouldn't. Note that, unlike
|
|||||||
for the @code{print} command, references are not automatically expanded
|
for the @code{print} command, references are not automatically expanded
|
||||||
when using the @code{format_string} method or the @code{str}
|
when using the @code{format_string} method or the @code{str}
|
||||||
function. There is no global @code{print} setting to change the default
|
function. There is no global @code{print} setting to change the default
|
||||||
behaviour.
|
behavior.
|
||||||
|
|
||||||
@item actual_objects
|
@item actual_objects
|
||||||
@code{True} if the representation of a pointer to an object should
|
@code{True} if the representation of a pointer to an object should
|
||||||
|
|||||||
@@ -2043,7 +2043,7 @@ decode_frame_entry (struct gdbarch *gdbarch,
|
|||||||
produces a hole in the frame info that gets filled by the
|
produces a hole in the frame info that gets filled by the
|
||||||
linker with zeros.
|
linker with zeros.
|
||||||
|
|
||||||
The GCC behaviour is arguably a bug, but it's effectively now
|
The GCC behavior is arguably a bug, but it's effectively now
|
||||||
part of the ABI, so we're now stuck with it, at least at the
|
part of the ABI, so we're now stuck with it, at least at the
|
||||||
object file level. A smart linker may decide, in the process
|
object file level. A smart linker may decide, in the process
|
||||||
of compressing duplicate CIE information, that it can rewrite
|
of compressing duplicate CIE information, that it can rewrite
|
||||||
|
|||||||
@@ -1031,7 +1031,7 @@ handle_fatal_signal (int sig)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* If possible arrange for SIG to have its default behaviour (which
|
/* If possible arrange for SIG to have its default behavior (which
|
||||||
should be to terminate the current process), unblock SIG, and reraise
|
should be to terminate the current process), unblock SIG, and reraise
|
||||||
the signal. This ensures GDB terminates with the expected signal. */
|
the signal. This ensures GDB terminates with the expected signal. */
|
||||||
if (signal (sig, SIG_DFL) != SIG_ERR
|
if (signal (sig, SIG_DFL) != SIG_ERR
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ const struct extension_language_defn extension_language_gdb =
|
|||||||
|
|
||||||
static const std::array<const extension_language_defn *, 2> extension_languages
|
static const std::array<const extension_language_defn *, 2> extension_languages
|
||||||
{
|
{
|
||||||
/* To preserve existing behaviour, python should always appear first. */
|
/* To preserve existing behavior, python should always appear first. */
|
||||||
&extension_language_python,
|
&extension_language_python,
|
||||||
&extension_language_guile,
|
&extension_language_guile,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ enum ext_lang_rc
|
|||||||
|
|
||||||
/* There was an error (e.g., Python error while printing a value).
|
/* There was an error (e.g., Python error while printing a value).
|
||||||
When an error occurs no further extension languages are tried.
|
When an error occurs no further extension languages are tried.
|
||||||
This is to preserve existing behaviour, and because it's convenient
|
This is to preserve existing behavior, and because it's convenient
|
||||||
for Python developers.
|
for Python developers.
|
||||||
Note: This is different than encountering a memory error trying to read
|
Note: This is different than encountering a memory error trying to read
|
||||||
a value for pretty-printing. Here we're referring to, e.g., programming
|
a value for pretty-printing. Here we're referring to, e.g., programming
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ private:
|
|||||||
|
|
||||||
/* A base class used by fortran_array_walker. There's no virtual methods
|
/* A base class used by fortran_array_walker. There's no virtual methods
|
||||||
here, sub-classes should just override the functions they want in order
|
here, sub-classes should just override the functions they want in order
|
||||||
to specialise the behaviour to their needs. The functionality
|
to specialise the behavior to their needs. The functionality
|
||||||
provided in these default implementations will visit every array
|
provided in these default implementations will visit every array
|
||||||
element, but do nothing for each element. */
|
element, but do nothing for each element. */
|
||||||
|
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ struct thread_suspend_state
|
|||||||
- If the thread is running, then this field has its value removed by
|
- If the thread is running, then this field has its value removed by
|
||||||
calling stop_pc.reset() (see thread_info::set_executing()).
|
calling stop_pc.reset() (see thread_info::set_executing()).
|
||||||
Attempting to read a std::optional with no value is undefined
|
Attempting to read a std::optional with no value is undefined
|
||||||
behaviour and will trigger an assertion error when _GLIBCXX_DEBUG is
|
behavior and will trigger an assertion error when _GLIBCXX_DEBUG is
|
||||||
defined, which should make error easier to track down. */
|
defined, which should make error easier to track down. */
|
||||||
std::optional<CORE_ADDR> stop_pc;
|
std::optional<CORE_ADDR> stop_pc;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ gdbscm_initialize_auto_load (void)
|
|||||||
{
|
{
|
||||||
add_setshow_boolean_cmd ("guile-scripts", class_support,
|
add_setshow_boolean_cmd ("guile-scripts", class_support,
|
||||||
&auto_load_guile_scripts, _("\
|
&auto_load_guile_scripts, _("\
|
||||||
Set the debugger's behaviour regarding auto-loaded Guile scripts."), _("\
|
Set the debugger's behavior regarding auto-loaded Guile scripts."), _("\
|
||||||
Show the debugger's behaviour regarding auto-loaded Guile scripts."), _("\
|
Show the debugger's behavior regarding auto-loaded Guile scripts."), _("\
|
||||||
If enabled, auto-loaded Guile scripts are loaded when the debugger reads\n\
|
If enabled, auto-loaded Guile scripts are loaded when the debugger reads\n\
|
||||||
an executable or shared library.\n\
|
an executable or shared library.\n\
|
||||||
This options has security implications for untrusted inferiors."),
|
This options has security implications for untrusted inferiors."),
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ lsscm_elt_type (lazy_string_smob *ls_smob)
|
|||||||
case TYPE_CODE_ARRAY:
|
case TYPE_CODE_ARRAY:
|
||||||
return realtype->target_type ();
|
return realtype->target_type ();
|
||||||
default:
|
default:
|
||||||
/* This is done to preserve existing behaviour. PR 20769.
|
/* This is done to preserve existing behavior. PR 20769.
|
||||||
E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type. */
|
E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type. */
|
||||||
return realtype;
|
return realtype;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -866,7 +866,7 @@ i386_displaced_step_fixup (struct gdbarch *gdbarch,
|
|||||||
ULONGEST eip = (pc - insn_offset) & 0xffffffffUL;
|
ULONGEST eip = (pc - insn_offset) & 0xffffffffUL;
|
||||||
|
|
||||||
/* If we just stepped over a breakpoint insn, we don't backup
|
/* If we just stepped over a breakpoint insn, we don't backup
|
||||||
the pc on purpose; this is to match behaviour without
|
the pc on purpose; this is to match behavior without
|
||||||
stepping. */
|
stepping. */
|
||||||
|
|
||||||
regcache_write_pc (regs, eip);
|
regcache_write_pc (regs, eip);
|
||||||
|
|||||||
@@ -1834,7 +1834,7 @@ The program being debugged entered a std::terminate call, most likely\n\
|
|||||||
caused by an unhandled C++ exception. GDB blocked this call in order\n\
|
caused by an unhandled C++ exception. GDB blocked this call in order\n\
|
||||||
to prevent the program from being terminated, and has restored the\n\
|
to prevent the program from being terminated, and has restored the\n\
|
||||||
context to its original state before the call.\n\
|
context to its original state before the call.\n\
|
||||||
To change this behaviour use \"set unwind-on-terminating-exception off\".\n\
|
To change this behavior use \"set unwind-on-terminating-exception off\".\n\
|
||||||
Evaluation of the expression containing the function (%s)\n\
|
Evaluation of the expression containing the function (%s)\n\
|
||||||
will be abandoned."),
|
will be abandoned."),
|
||||||
name.c_str ());
|
name.c_str ());
|
||||||
|
|||||||
@@ -4958,7 +4958,7 @@ adjust_pc_after_break (struct thread_info *thread,
|
|||||||
we would wrongly adjust the PC to 0x08000000, since there's a
|
we would wrongly adjust the PC to 0x08000000, since there's a
|
||||||
breakpoint at PC - 1. We'd then report a hit on B1, although
|
breakpoint at PC - 1. We'd then report a hit on B1, although
|
||||||
INSN1 hadn't been de-executed yet. Doing nothing is the correct
|
INSN1 hadn't been de-executed yet. Doing nothing is the correct
|
||||||
behaviour. */
|
behavior. */
|
||||||
if (execution_direction == EXEC_REVERSE)
|
if (execution_direction == EXEC_REVERSE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -788,7 +788,7 @@ struct symbol *
|
|||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
|
|
||||||
/* These macros define the behaviour of the expression
|
/* These macros define the behavior of the expression
|
||||||
evaluator. */
|
evaluator. */
|
||||||
|
|
||||||
/* Should we range check values against the domain of their type? */
|
/* Should we range check values against the domain of their type? */
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ linespec_location_spec::linespec_location_spec
|
|||||||
p = remove_trailing_whitespace (orig, *linespec);
|
p = remove_trailing_whitespace (orig, *linespec);
|
||||||
|
|
||||||
/* If there is no valid linespec then this will leave the
|
/* If there is no valid linespec then this will leave the
|
||||||
spec_string as nullptr. This behaviour is relied on in the
|
spec_string as nullptr. This behavior is relied on in the
|
||||||
breakpoint setting code, where spec_string being nullptr means
|
breakpoint setting code, where spec_string being nullptr means
|
||||||
to use the default breakpoint location. */
|
to use the default breakpoint location. */
|
||||||
if ((p - orig) > 0)
|
if ((p - orig) > 0)
|
||||||
|
|||||||
@@ -4401,7 +4401,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
|||||||
case btTypedef:
|
case btTypedef:
|
||||||
/* Follow a forward typedef. This might recursively
|
/* Follow a forward typedef. This might recursively
|
||||||
call cross_ref till we get a non typedef'ed type.
|
call cross_ref till we get a non typedef'ed type.
|
||||||
FIXME: This is not correct behaviour, but gdb currently
|
FIXME: This is not correct behavior, but gdb currently
|
||||||
cannot handle typedefs without type copying. Type
|
cannot handle typedefs without type copying. Type
|
||||||
copying is impossible as we might have mutual forward
|
copying is impossible as we might have mutual forward
|
||||||
references between two files and the copied type would not
|
references between two files and the copied type would not
|
||||||
@@ -4427,7 +4427,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
|||||||
{
|
{
|
||||||
/* Parse the type for a normal typedef. This might recursively call
|
/* Parse the type for a normal typedef. This might recursively call
|
||||||
cross_ref till we get a non typedef'ed type.
|
cross_ref till we get a non typedef'ed type.
|
||||||
FIXME: This is not correct behaviour, but gdb currently
|
FIXME: This is not correct behavior, but gdb currently
|
||||||
cannot handle typedefs without type copying. But type copying is
|
cannot handle typedefs without type copying. But type copying is
|
||||||
impossible as we might have mutual forward references between
|
impossible as we might have mutual forward references between
|
||||||
two files and the copied type would not get filled in when
|
two files and the copied type would not get filled in when
|
||||||
|
|||||||
@@ -2077,7 +2077,7 @@ mi_cmd_execute (struct mi_parse *parse)
|
|||||||
error (_("Invalid thread group for the --thread-group option"));
|
error (_("Invalid thread group for the --thread-group option"));
|
||||||
|
|
||||||
set_current_inferior (inf);
|
set_current_inferior (inf);
|
||||||
/* This behaviour means that if --thread-group option identifies
|
/* This behavior means that if --thread-group option identifies
|
||||||
an inferior with multiple threads, then a random one will be
|
an inferior with multiple threads, then a random one will be
|
||||||
picked. This is not a problem -- frontend should always
|
picked. This is not a problem -- frontend should always
|
||||||
provide --thread if it wishes to operate on a specific
|
provide --thread if it wishes to operate on a specific
|
||||||
|
|||||||
@@ -581,7 +581,7 @@ vector_relop (struct expression *exp, struct value *val1, struct value *val2,
|
|||||||
|
|
||||||
/* Perform a cast of ARG into TYPE. There's sadly a lot of duplication in
|
/* Perform a cast of ARG into TYPE. There's sadly a lot of duplication in
|
||||||
here from valops.c:value_cast, opencl is different only in the
|
here from valops.c:value_cast, opencl is different only in the
|
||||||
behaviour of scalar to vector casting. As far as possibly we're going
|
behavior of scalar to vector casting. As far as possibly we're going
|
||||||
to try and delegate back to the standard value_cast function. */
|
to try and delegate back to the standard value_cast function. */
|
||||||
|
|
||||||
struct value *
|
struct value *
|
||||||
|
|||||||
@@ -61,8 +61,8 @@ gdbpy_initialize_auto_load (void)
|
|||||||
{
|
{
|
||||||
add_setshow_boolean_cmd ("python-scripts", class_support,
|
add_setshow_boolean_cmd ("python-scripts", class_support,
|
||||||
&auto_load_python_scripts, _("\
|
&auto_load_python_scripts, _("\
|
||||||
Set the debugger's behaviour regarding auto-loaded Python scripts."), _("\
|
Set the debugger's behavior regarding auto-loaded Python scripts."), _("\
|
||||||
Show the debugger's behaviour regarding auto-loaded Python scripts."), _("\
|
Show the debugger's behavior regarding auto-loaded Python scripts."), _("\
|
||||||
If enabled, auto-loaded Python scripts are loaded when the debugger reads\n\
|
If enabled, auto-loaded Python scripts are loaded when the debugger reads\n\
|
||||||
an executable or shared library.\n\
|
an executable or shared library.\n\
|
||||||
This options has security implications for untrusted inferiors."),
|
This options has security implications for untrusted inferiors."),
|
||||||
@@ -73,10 +73,10 @@ This options has security implications for untrusted inferiors."),
|
|||||||
set_show_commands auto_load_scripts_cmds
|
set_show_commands auto_load_scripts_cmds
|
||||||
= add_setshow_boolean_cmd ("auto-load-scripts", class_support,
|
= add_setshow_boolean_cmd ("auto-load-scripts", class_support,
|
||||||
&auto_load_python_scripts, _("\
|
&auto_load_python_scripts, _("\
|
||||||
Set the debugger's behaviour regarding auto-loaded Python scripts, "
|
Set the debugger's behavior regarding auto-loaded Python scripts, "
|
||||||
"deprecated."),
|
"deprecated."),
|
||||||
_("\
|
_("\
|
||||||
Show the debugger's behaviour regarding auto-loaded Python scripts, "
|
Show the debugger's behavior regarding auto-loaded Python scripts, "
|
||||||
"deprecated."),
|
"deprecated."),
|
||||||
NULL, NULL, show_auto_load_python_scripts,
|
NULL, NULL, show_auto_load_python_scripts,
|
||||||
&setlist, &showlist);
|
&setlist, &showlist);
|
||||||
|
|||||||
@@ -342,7 +342,7 @@ struct py_send_packet_callbacks : public send_remote_packet_callbacks
|
|||||||
It is important that the result is inspected immediately after sending
|
It is important that the result is inspected immediately after sending
|
||||||
a packet to the remote, and any error fetched, calling any other
|
a packet to the remote, and any error fetched, calling any other
|
||||||
Python functions that might clear the error state, or rely on an error
|
Python functions that might clear the error state, or rely on an error
|
||||||
not being set will cause undefined behaviour. */
|
not being set will cause undefined behavior. */
|
||||||
|
|
||||||
gdbpy_ref<> result () const
|
gdbpy_ref<> result () const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ disasm_info_dealloc (PyObject *self)
|
|||||||
NEXT is nullptr. */
|
NEXT is nullptr. */
|
||||||
Py_XDECREF ((PyObject *) obj->next);
|
Py_XDECREF ((PyObject *) obj->next);
|
||||||
|
|
||||||
/* Now core deallocation behaviour. */
|
/* Now core deallocation behavior. */
|
||||||
Py_TYPE (self)->tp_free (self);
|
Py_TYPE (self)->tp_free (self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,7 +740,7 @@ disasmpy_info_progspace (PyObject *self, void *closure)
|
|||||||
part in the gdbpy_disassembler is a text part in the same STYLE, then
|
part in the gdbpy_disassembler is a text part in the same STYLE, then
|
||||||
the new string is appended to the previous part.
|
the new string is appended to the previous part.
|
||||||
|
|
||||||
The merging behaviour make the Python API a little more user friendly,
|
The merging behavior make the Python API a little more user friendly,
|
||||||
some disassemblers produce their output character at a time, there's no
|
some disassemblers produce their output character at a time, there's no
|
||||||
particular reason for this, it's just how they are implemented. By
|
particular reason for this, it's just how they are implemented. By
|
||||||
merging parts with the same style we make it easier for the user to
|
merging parts with the same style we make it easier for the user to
|
||||||
|
|||||||
@@ -762,7 +762,7 @@ py_print_frame (PyObject *filter, frame_filter_flags flags,
|
|||||||
default value for the backtrace command (see the call to print_frame_info
|
default value for the backtrace command (see the call to print_frame_info
|
||||||
in backtrace_command_1).
|
in backtrace_command_1).
|
||||||
Having the same default ensures that 'bt' and 'bt no-filters'
|
Having the same default ensures that 'bt' and 'bt no-filters'
|
||||||
have the same behaviour when some filters exist but do not apply
|
have the same behavior when some filters exist but do not apply
|
||||||
to a frame. */
|
to a frame. */
|
||||||
enum print_what print_what
|
enum print_what print_what
|
||||||
= out->is_mi_like_p () ? LOC_AND_ADDRESS : LOCATION;
|
= out->is_mi_like_p () ? LOC_AND_ADDRESS : LOCATION;
|
||||||
|
|||||||
@@ -264,7 +264,7 @@ stpy_lazy_string_elt_type (lazy_string_object *lazy)
|
|||||||
case TYPE_CODE_ARRAY:
|
case TYPE_CODE_ARRAY:
|
||||||
return check_typedef (realtype->target_type ());
|
return check_typedef (realtype->target_type ());
|
||||||
default:
|
default:
|
||||||
/* This is done to preserve existing behaviour. PR 20769.
|
/* This is done to preserve existing behavior. PR 20769.
|
||||||
E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type. */
|
E.g., gdb.parse_and_eval("my_int_variable").lazy_string().type. */
|
||||||
return realtype;
|
return realtype;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -733,7 +733,7 @@ btrace_find_line_range (CORE_ADDR pc)
|
|||||||
{
|
{
|
||||||
/* The test of is_stmt here was added when the is_stmt field was
|
/* The test of is_stmt here was added when the is_stmt field was
|
||||||
introduced to the 'struct linetable_entry' structure. This
|
introduced to the 'struct linetable_entry' structure. This
|
||||||
ensured that this loop maintained the same behaviour as before we
|
ensured that this loop maintained the same behavior as before we
|
||||||
introduced is_stmt. That said, it might be that we would be
|
introduced is_stmt. That said, it might be that we would be
|
||||||
better off not checking is_stmt here, this would lead to us
|
better off not checking is_stmt here, this would lead to us
|
||||||
possibly adding more line numbers to the range. At the time this
|
possibly adding more line numbers to the range. At the time this
|
||||||
|
|||||||
@@ -555,7 +555,7 @@ remote_fileio_func_read (remote_target *remote, char *buf)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
buffer = (gdb_byte *) xmalloc (length);
|
buffer = (gdb_byte *) xmalloc (length);
|
||||||
/* POSIX defines EINTR behaviour of read in a weird way. It's allowed
|
/* POSIX defines EINTR behavior of read in a weird way. It's allowed
|
||||||
for read() to return -1 even if "some" bytes have been read. It
|
for read() to return -1 even if "some" bytes have been read. It
|
||||||
has been corrected in SUSv2 but that doesn't help us much...
|
has been corrected in SUSv2 but that doesn't help us much...
|
||||||
Therefore a complete solution must check how many bytes have been
|
Therefore a complete solution must check how many bytes have been
|
||||||
|
|||||||
@@ -2163,7 +2163,7 @@ skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc, CORE_ADDR lim_pc,
|
|||||||
this might be a call to an initializer in main(), introduced by gcc2.
|
this might be a call to an initializer in main(), introduced by gcc2.
|
||||||
We'd like to skip over it as well. Fortunately, xlc does some extra
|
We'd like to skip over it as well. Fortunately, xlc does some extra
|
||||||
work before calling a function right after a prologue, thus we can
|
work before calling a function right after a prologue, thus we can
|
||||||
single out such gcc2 behaviour. */
|
single out such gcc2 behavior. */
|
||||||
|
|
||||||
|
|
||||||
if ((op & 0xfc000001) == 0x48000001)
|
if ((op & 0xfc000001) == 0x48000001)
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ prepare_path_for_appending (const char *path)
|
|||||||
using mode MODE in the calls to open. You cannot use this function to
|
using mode MODE in the calls to open. You cannot use this function to
|
||||||
create files (O_CREAT).
|
create files (O_CREAT).
|
||||||
|
|
||||||
OPTS specifies the function behaviour in specific cases.
|
OPTS specifies the function behavior in specific cases.
|
||||||
|
|
||||||
If OPF_TRY_CWD_FIRST, try to open ./STRING before searching PATH.
|
If OPF_TRY_CWD_FIRST, try to open ./STRING before searching PATH.
|
||||||
(ie pretend the first element of PATH is "."). This also indicates
|
(ie pretend the first element of PATH is "."). This also indicates
|
||||||
@@ -949,7 +949,7 @@ done:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This is essentially a convenience, for clients that want the behaviour
|
/* This is essentially a convenience, for clients that want the behavior
|
||||||
of openp, using source_path, but that really don't want the file to be
|
of openp, using source_path, but that really don't want the file to be
|
||||||
opened but want instead just to know what the full pathname is (as
|
opened but want instead just to know what the full pathname is (as
|
||||||
qualified against source_path).
|
qualified against source_path).
|
||||||
|
|||||||
@@ -4258,7 +4258,7 @@ find_epilogue_using_linetable (CORE_ADDR func_addr)
|
|||||||
/* Move to the last linetable entry of the current function. */
|
/* Move to the last linetable entry of the current function. */
|
||||||
if (it == &linetable->item[0])
|
if (it == &linetable->item[0])
|
||||||
{
|
{
|
||||||
/* Doing it-- would introduce undefined behaviour, avoid it by
|
/* Doing it-- would introduce undefined behavior, avoid it by
|
||||||
explicitly handling this case. */
|
explicitly handling this case. */
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@@ -4292,7 +4292,7 @@ find_epilogue_using_linetable (CORE_ADDR func_addr)
|
|||||||
if (it == &linetable->item[0])
|
if (it == &linetable->item[0])
|
||||||
{
|
{
|
||||||
/* No more entries in the current function.
|
/* No more entries in the current function.
|
||||||
Doing it-- would introduce undefined behaviour, avoid it by
|
Doing it-- would introduce undefined behavior, avoid it by
|
||||||
explicitly handling this case. */
|
explicitly handling this case. */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1661,7 +1661,7 @@ struct memory_write_request
|
|||||||
void *baton;
|
void *baton;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Enumeration specifying different flash preservation behaviour. */
|
/* Enumeration specifying different flash preservation behavior. */
|
||||||
enum flash_preserve_mode
|
enum flash_preserve_mode
|
||||||
{
|
{
|
||||||
flash_preserve,
|
flash_preserve,
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ endif
|
|||||||
# in the same situation, we avoid invoking DejaGnu, and instead just call
|
# in the same situation, we avoid invoking DejaGnu, and instead just call
|
||||||
# the check/no-matching-tests-found rule (which prints a helpful message).
|
# the check/no-matching-tests-found rule (which prints a helpful message).
|
||||||
#
|
#
|
||||||
# To get the same behaviour for check-single we decide here, based on how
|
# To get the same behavior for check-single we decide here, based on how
|
||||||
# TESTS expanded, whether check-single should redirect to do-check-single or
|
# TESTS expanded, whether check-single should redirect to do-check-single or
|
||||||
# to check/no-matching-tests-found.
|
# to check/no-matching-tests-found.
|
||||||
ifeq ($(expanded_tests_or_none),no-matching-tests-found)
|
ifeq ($(expanded_tests_or_none),no-matching-tests-found)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ func1 (void *ptr)
|
|||||||
|
|
||||||
/* Finds and returns an invalid pointer, mmaps in a page, grabs a pointer
|
/* Finds and returns an invalid pointer, mmaps in a page, grabs a pointer
|
||||||
to it then unmaps the page again. This is almost certainly "undefined"
|
to it then unmaps the page again. This is almost certainly "undefined"
|
||||||
behaviour, but should be good enough for this small test program. */
|
behavior, but should be good enough for this small test program. */
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
make_invalid_ptr (void)
|
make_invalid_ptr (void)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
# frame where the stack in unreadable.
|
# frame where the stack in unreadable.
|
||||||
#
|
#
|
||||||
# One interesting bug that has been observed is that gdb will sometime
|
# One interesting bug that has been observed is that gdb will sometime
|
||||||
# exhibit different behaviour the first time a stack command is run
|
# exhibit different behavior the first time a stack command is run
|
||||||
# compared to the second (and later) times a command is run. This is
|
# compared to the second (and later) times a command is run. This is
|
||||||
# because the first time a command is run gdb actually tries to figure out
|
# because the first time a command is run gdb actually tries to figure out
|
||||||
# the answer, while the second (and later) times gdb relies on the answer
|
# the answer, while the second (and later) times gdb relies on the answer
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func1 (void *ptr)
|
|||||||
|
|
||||||
/* Finds and returns an invalid pointer, mmaps in a page, grabs a pointer
|
/* Finds and returns an invalid pointer, mmaps in a page, grabs a pointer
|
||||||
to it then unmaps the page again. This is almost certainly "undefined"
|
to it then unmaps the page again. This is almost certainly "undefined"
|
||||||
behaviour, but should be good enough for this small test program. */
|
behavior, but should be good enough for this small test program. */
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
make_invalid_ptr (void)
|
make_invalid_ptr (void)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
# frame where the stack in unreadable.
|
# frame where the stack in unreadable.
|
||||||
#
|
#
|
||||||
# One interesting bug that has been observed is that gdb will sometime
|
# One interesting bug that has been observed is that gdb will sometime
|
||||||
# exhibit different behaviour the first time a stack command is run
|
# exhibit different behavior the first time a stack command is run
|
||||||
# compared to the second (and later) times a command is run. This is
|
# compared to the second (and later) times a command is run. This is
|
||||||
# because the first time a command is run gdb actually tries to figure out
|
# because the first time a command is run gdb actually tries to figure out
|
||||||
# the answer, while the second (and later) times gdb relies on the answer
|
# the answer, while the second (and later) times gdb relies on the answer
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Test the 'maint set backtrace-on-fatal-signal' behaviour. Start up
|
# Test the 'maint set backtrace-on-fatal-signal' behavior. Start up
|
||||||
# GDB, turn on backtrace-on-fatal-signal, then send fatal signals to
|
# GDB, turn on backtrace-on-fatal-signal, then send fatal signals to
|
||||||
# GDB and ensure we see the backtrace.
|
# GDB and ensure we see the backtrace.
|
||||||
|
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ file rename -force -- $bkpsrc $srcfile
|
|||||||
# As before, delay so that at least one second has passed. GDB still
|
# As before, delay so that at least one second has passed. GDB still
|
||||||
# will not spot that the source file has changed, as GDB doesn't do a
|
# will not spot that the source file has changed, as GDB doesn't do a
|
||||||
# time check unless the binary has also changed, this delay just
|
# time check unless the binary has also changed, this delay just
|
||||||
# allows us to confirm this behaviour.
|
# allows us to confirm this behavior.
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
# List the printf line again, we should not see the file changes yet
|
# List the printf line again, we should not see the file changes yet
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ if { ![runto_main] } {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
# Verify set may-call-functions behaviour.
|
# Verify set may-call-functions behavior.
|
||||||
gdb_test_no_output "set may-call-functions off"
|
gdb_test_no_output "set may-call-functions off"
|
||||||
gdb_test "call callexit()" \
|
gdb_test "call callexit()" \
|
||||||
"Cannot call functions in the program: may-call-functions is off." \
|
"Cannot call functions in the program: may-call-functions is off." \
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ gdb_test "with breakpoint pending off -- break main ta 999 if (1==1)" \
|
|||||||
# as " - force - condition", that is, subtraction of the symbol
|
# as " - force - condition", that is, subtraction of the symbol
|
||||||
# "force" followed by subtraction of symbol "context". This is really
|
# "force" followed by subtraction of symbol "context". This is really
|
||||||
# just a quirk of how this used to be implemented, and should maybe be
|
# just a quirk of how this used to be implemented, and should maybe be
|
||||||
# changed in the future. However, for now GDB retains this behaviour.
|
# changed in the future. However, for now GDB retains this behavior.
|
||||||
gdb_test "break *main if (1==1) -force-condition" \
|
gdb_test "break *main if (1==1) -force-condition" \
|
||||||
"No symbol \"force\" in current context\\."
|
"No symbol \"force\" in current context\\."
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ gdb_test "abc-prefix def-prefix ghi-prefix-cmd alternate-jkl-cmd" \
|
|||||||
"use user command after redefining ghi-prefix-cmd: alternate-jkl-cmd"
|
"use user command after redefining ghi-prefix-cmd: alternate-jkl-cmd"
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# Check error behaviour.
|
# Check error behavior.
|
||||||
|
|
||||||
gdb_test "define-prefix print" ".* is built-in.*"
|
gdb_test "define-prefix print" ".* is built-in.*"
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ gdb_test "print \$_exitsignal" " = 11" \
|
|||||||
gdb_test "print \$_exitcode" " = void" \
|
gdb_test "print \$_exitcode" " = void" \
|
||||||
"\$_exitcode is still void after restarting the inferior"
|
"\$_exitcode is still void after restarting the inferior"
|
||||||
|
|
||||||
# Now we test the behaviour of $_exit{code,signal} during a normal
|
# Now we test the behavior of $_exit{code,signal} during a normal
|
||||||
# inferior execution.
|
# inferior execution.
|
||||||
standard_testfile normal.c
|
standard_testfile normal.c
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
# range. It is only when GDB exits the loop that we leave the stepping
|
# range. It is only when GDB exits the loop that we leave the stepping
|
||||||
# range, and the stepping finishes at address 0x114.
|
# range, and the stepping finishes at address 0x114.
|
||||||
#
|
#
|
||||||
# This test checks this behaviour using the DWARF assembler.
|
# This test checks this behavior using the DWARF assembler.
|
||||||
|
|
||||||
load_lib dwarf.exp
|
load_lib dwarf.exp
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
require {!is_remote host}
|
require {!is_remote host}
|
||||||
|
|
||||||
# Test both ansi (no auto-wrap) and xterm (auto-wrap). Also test dumb, which
|
# Test both ansi (no auto-wrap) and xterm (auto-wrap). Also test dumb, which
|
||||||
# shows the effective behaviour on stub-termcap systems, regardless of the
|
# shows the effective behavior on stub-termcap systems, regardless of the
|
||||||
# TERM setting.
|
# TERM setting.
|
||||||
set terms {ansi xterm dumb}
|
set terms {ansi xterm dumb}
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ with_test_prefix "Custom" {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
### 2.2 None as filter. This resets the default behaviour.
|
### 2.2 None as filter. This resets the default behavior.
|
||||||
with_test_prefix "None" {
|
with_test_prefix "None" {
|
||||||
gdb_test_multiline "register filter in python" \
|
gdb_test_multiline "register filter in python" \
|
||||||
"python" "" \
|
"python" "" \
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
# (gdb) print enum_var
|
# (gdb) print enum_var
|
||||||
# $1 = 8
|
# $1 = 8
|
||||||
#
|
#
|
||||||
# This test checks this behaviour.
|
# This test checks this behavior.
|
||||||
|
|
||||||
standard_testfile .cc
|
standard_testfile .cc
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
# in-frame). The default handler calls std::terminate. This will kill
|
# in-frame). The default handler calls std::terminate. This will kill
|
||||||
# the inferior. Assert that terminate should never be called in an
|
# the inferior. Assert that terminate should never be called in an
|
||||||
# inferior function call. These tests test the functionality around
|
# inferior function call. These tests test the functionality around
|
||||||
# unwinding that sequence and also tests the flag behaviour gating this
|
# unwinding that sequence and also tests the flag behavior gating this
|
||||||
# functionality.
|
# functionality.
|
||||||
#
|
#
|
||||||
# PR c++/9600.
|
# PR c++/9600.
|
||||||
@@ -51,7 +51,7 @@ if {![runto_main]} {
|
|||||||
|
|
||||||
# See http://sourceware.org/gdb/bugs/2495
|
# See http://sourceware.org/gdb/bugs/2495
|
||||||
|
|
||||||
# Test normal baseline behaviour. Call a function that
|
# Test normal baseline behavior. Call a function that
|
||||||
# does not raise an exception.
|
# does not raise an exception.
|
||||||
gdb_test "p exceptions.no_throw_function()" " = 1"
|
gdb_test "p exceptions.no_throw_function()" " = 1"
|
||||||
# And one that does but handles it in-frame.
|
# And one that does but handles it in-frame.
|
||||||
@@ -75,7 +75,7 @@ gdb_test "bt" \
|
|||||||
gdb_test "info breakpoints" \
|
gdb_test "info breakpoints" \
|
||||||
"gdb2495\.cc.*"
|
"gdb2495\.cc.*"
|
||||||
|
|
||||||
# Turn off this new behaviour.
|
# Turn off this new behavior.
|
||||||
gdb_test_no_output "set unwind-on-terminating-exception off"
|
gdb_test_no_output "set unwind-on-terminating-exception off"
|
||||||
|
|
||||||
# Check that it is turned off.
|
# Check that it is turned off.
|
||||||
@@ -83,7 +83,7 @@ gdb_test "show unwind-on-terminating-exception" \
|
|||||||
"exception is unhandled while in a call dummy is off.*" \
|
"exception is unhandled while in a call dummy is off.*" \
|
||||||
"turn off unwind on terminating exception flag"
|
"turn off unwind on terminating exception flag"
|
||||||
|
|
||||||
# Check that the old behaviour is restored.
|
# Check that the old behavior is restored.
|
||||||
gdb_test "p exceptions.throw_function()" \
|
gdb_test "p exceptions.throw_function()" \
|
||||||
"The program being debugged was signaled while in a function called .*" \
|
"The program being debugged was signaled while in a function called .*" \
|
||||||
"call a function that raises an exception with unwinding off.."
|
"call a function that raises an exception with unwinding off.."
|
||||||
@@ -94,10 +94,10 @@ if {![runto_main]} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Check to see if the new behaviour alters the unwind signal
|
# Check to see if the new behavior alters the unwind signal
|
||||||
# behaviour; it should not. Test both on and off states.
|
# behaviour; it should not. Test both on and off states.
|
||||||
|
|
||||||
# Turn on unwind on signal behaviour.
|
# Turn on unwind on signal behavior.
|
||||||
gdb_test_no_output "set unwind-on-signal on"
|
gdb_test_no_output "set unwind-on-signal on"
|
||||||
|
|
||||||
# Check that it is turned on.
|
# Check that it is turned on.
|
||||||
@@ -105,7 +105,7 @@ gdb_test "show unwind-on-signal" \
|
|||||||
"signal is received while in a call dummy is on.*" \
|
"signal is received while in a call dummy is on.*" \
|
||||||
"turn on unwind on signal"
|
"turn on unwind on signal"
|
||||||
|
|
||||||
# Check to see if new behaviour interferes with
|
# Check to see if new behavior interferes with
|
||||||
# normal signal handling in inferior function calls.
|
# normal signal handling in inferior function calls.
|
||||||
gdb_test "p exceptions.raise_signal(1)" \
|
gdb_test "p exceptions.raise_signal(1)" \
|
||||||
[multi_line \
|
[multi_line \
|
||||||
@@ -124,7 +124,7 @@ gdb_test "show unwind-on-signal" \
|
|||||||
"signal is received while in a call dummy is off.*" \
|
"signal is received while in a call dummy is off.*" \
|
||||||
"turn off unwind on signal"
|
"turn off unwind on signal"
|
||||||
|
|
||||||
# Check to see if new behaviour interferes with
|
# Check to see if new behavior interferes with
|
||||||
# normal signal handling in inferior function calls.
|
# normal signal handling in inferior function calls.
|
||||||
gdb_test "p exceptions.raise_signal(1)" \
|
gdb_test "p exceptions.raise_signal(1)" \
|
||||||
"To change this behavior use \"set unwind-on-signal on\".*" \
|
"To change this behavior use \"set unwind-on-signal on\".*" \
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ main ()
|
|||||||
library_base_address
|
library_base_address
|
||||||
= mmap (NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
= mmap (NULL, buf.st_size, PROT_READ, MAP_PRIVATE, fd, 0);
|
||||||
|
|
||||||
res = *ptr; /* Undefined behaviour here. */
|
res = *ptr; /* Undefined behavior here. */
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ if {![runto_main]} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
gdb_breakpoint [gdb_get_line_number "Undefined behaviour here" $srcfile3]
|
gdb_breakpoint [gdb_get_line_number "Undefined behavior here" $srcfile3]
|
||||||
gdb_continue_to_breakpoint "run to breakpoint"
|
gdb_continue_to_breakpoint "run to breakpoint"
|
||||||
|
|
||||||
set library_base_address \
|
set library_base_address \
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ proc test_d_float_literals {} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proc test_d_expressions {} {
|
proc test_d_expressions {} {
|
||||||
# Test expression behaviour specific to D.
|
# Test expression behavior specific to D.
|
||||||
|
|
||||||
# Comparison and order expressions have same precedence.
|
# Comparison and order expressions have same precedence.
|
||||||
gdb_test "print 1 == 2 > 0" "A syntax error in expression, near `> 0'\."
|
gdb_test "print 1 == 2 > 0" "A syntax error in expression, near `> 0'\."
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
# third breakpoint will actually be placed at the same location as the
|
# third breakpoint will actually be placed at the same location as the
|
||||||
# second breakpoint.
|
# second breakpoint.
|
||||||
#
|
#
|
||||||
# This test is designed to test GDB's internal behaviour with respect
|
# This test is designed to test GDB's internal behavior with respect
|
||||||
# to discarding particular line table entries. GCC and DWARF are
|
# to discarding particular line table entries. GCC and DWARF are
|
||||||
# starting to introduce the idea of line table views. As the views
|
# starting to introduce the idea of line table views. As the views
|
||||||
# information becomes better supported within GDB it is likely that
|
# information becomes better supported within GDB it is likely that
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
/* This test relies on foo being inlined into main and bar not being
|
/* This test relies on foo being inlined into main and bar not being
|
||||||
inlined. The test is checking GDB's behaviour as we single step from
|
inlined. The test is checking GDB's behavior as we single step from
|
||||||
main through foo and into bar. */
|
main through foo and into bar. */
|
||||||
|
|
||||||
volatile int global_var;
|
volatile int global_var;
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ clean_restart
|
|||||||
gdb_test_no_output "maint set dwarf synchronous on"
|
gdb_test_no_output "maint set dwarf synchronous on"
|
||||||
|
|
||||||
# This pattern is hit when GDB does not use -readnow (i.e. the default
|
# This pattern is hit when GDB does not use -readnow (i.e. the default
|
||||||
# behaviour).
|
# behavior).
|
||||||
set pattern1 \
|
set pattern1 \
|
||||||
[multi_line \
|
[multi_line \
|
||||||
"Reading symbols from \[^\r\n\]+" \
|
"Reading symbols from \[^\r\n\]+" \
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
|
||||||
/* Test the behaviour of gdb in the following situation, the dwarf debug
|
/* Test the behavior of gdb in the following situation, the dwarf debug
|
||||||
information describes a parameter as being in a register but a more
|
information describes a parameter as being in a register but a more
|
||||||
recent (inner) frame marks the register as being undefined.
|
recent (inner) frame marks the register as being undefined.
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
clobbering them.
|
clobbering them.
|
||||||
|
|
||||||
The dwarf register numbering is different to the gdb register number.
|
The dwarf register numbering is different to the gdb register number.
|
||||||
In some of the tests we rely on gdb behaviour of being able to specify a
|
In some of the tests we rely on gdb behavior of being able to specify a
|
||||||
struct using a single register location, the structure will then "flow"
|
struct using a single register location, the structure will then "flow"
|
||||||
into the next gdb register. The initial register is specified using a
|
into the next gdb register. The initial register is specified using a
|
||||||
dwarf register number, but the "next" register will depend on gdb
|
dwarf register number, but the "next" register will depend on gdb
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ set line1 "Reading symbols from \[^\r\n\]+"
|
|||||||
set dwarf_error "DWARF Error: DW_FORM_strp used without required section"
|
set dwarf_error "DWARF Error: DW_FORM_strp used without required section"
|
||||||
|
|
||||||
# This pattern is hit when GDB does not use -readnow (i.e. the default
|
# This pattern is hit when GDB does not use -readnow (i.e. the default
|
||||||
# behaviour).
|
# behavior).
|
||||||
set pattern1 \
|
set pattern1 \
|
||||||
[multi_line \
|
[multi_line \
|
||||||
$line1 \
|
$line1 \
|
||||||
|
|||||||
@@ -245,7 +245,7 @@ proc run_test { repack } {
|
|||||||
# The goal here is to compare the sizes of the slice in show with
|
# The goal here is to compare the sizes of the slice in show with
|
||||||
# the size of the slice extracted by GDB. So we can only compare
|
# the size of the slice extracted by GDB. So we can only compare
|
||||||
# sizes when GDB's repacking setting matches the repacking
|
# sizes when GDB's repacking setting matches the repacking
|
||||||
# behaviour we got from the compiler.
|
# behavior we got from the compiler.
|
||||||
if { ($addr_in_show < $start_addr || $addr_in_show >= $end_addr) \
|
if { ($addr_in_show < $start_addr || $addr_in_show >= $end_addr) \
|
||||||
== ($repack == "on") } {
|
== ($repack == "on") } {
|
||||||
gdb_assert {$size_in_show == $size_in_parent} \
|
gdb_assert {$size_in_show == $size_in_parent} \
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ proc do_bp_tests {with_src_prefix_p with_nest_prefix_p} {
|
|||||||
# Currently referencing symbols using 'info',
|
# Currently referencing symbols using 'info',
|
||||||
# 'whatis' and 'ptype' before the program is
|
# 'whatis' and 'ptype' before the program is
|
||||||
# started doesn't work. This is the same
|
# started doesn't work. This is the same
|
||||||
# behaviour we see in C++ so I don't think this
|
# behavior we see in C++ so I don't think this
|
||||||
# is a failure, just a limitation in current GDB.
|
# is a failure, just a limitation in current GDB.
|
||||||
if { ${with_nest_prefix_p} } {
|
if { ${with_nest_prefix_p} } {
|
||||||
gdb_test "info symbol ${nest_prefix}${function}" \
|
gdb_test "info symbol ${nest_prefix}${function}" \
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ proc run_test { unwind_on_exception } {
|
|||||||
"&\"caused by an unhandled C\\+\\+ exception. GDB blocked this call in order\\\\n\"" \
|
"&\"caused by an unhandled C\\+\\+ exception. GDB blocked this call in order\\\\n\"" \
|
||||||
"&\"to prevent the program from being terminated, and has restored the\\\\n\"" \
|
"&\"to prevent the program from being terminated, and has restored the\\\\n\"" \
|
||||||
"&\"context to its original state before the call.\\\\n\"" \
|
"&\"context to its original state before the call.\\\\n\"" \
|
||||||
"&\"To change this behaviour use \\\\\"set unwind-on-terminating-exception off\\\\\"\\.\\\\n\"" \
|
"&\"To change this behavior use \\\\\"set unwind-on-terminating-exception off\\\\\"\\.\\\\n\"" \
|
||||||
"&\"Evaluation of the expression containing the function \\(cond_throw\\(\\)\\)\\\\n\"" \
|
"&\"Evaluation of the expression containing the function \\(cond_throw\\(\\)\\)\\\\n\"" \
|
||||||
"&\"will be abandoned.\\\\n\"" \
|
"&\"will be abandoned.\\\\n\"" \
|
||||||
"=breakpoint-modified,bkpt={number=\"$bpnum\",type=\"breakpoint\",\[^\r\n\]+times=\"1\",\[^\r\n\]+}" \
|
"=breakpoint-modified,bkpt={number=\"$bpnum\",type=\"breakpoint\",\[^\r\n\]+times=\"1\",\[^\r\n\]+}" \
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ gdb_expect {
|
|||||||
"$real" "get children of pvla2_not_associated"
|
"$real" "get children of pvla2_not_associated"
|
||||||
}
|
}
|
||||||
-re "580\\^error,msg=\"value contents too large \\(\[0-9\]+ bytes\\).*${mi_gdb_prompt}$" {
|
-re "580\\^error,msg=\"value contents too large \\(\[0-9\]+ bytes\\).*${mi_gdb_prompt}$" {
|
||||||
# Undefined behaviour in gfortran.
|
# Undefined behavior in gfortran.
|
||||||
xfail $test
|
xfail $test
|
||||||
}
|
}
|
||||||
-re "${mi_gdb_prompt}$" {
|
-re "${mi_gdb_prompt}$" {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ expect {
|
|||||||
exp_continue
|
exp_continue
|
||||||
}
|
}
|
||||||
# Likewise, but with startup-with-shell enabled, which is the
|
# Likewise, but with startup-with-shell enabled, which is the
|
||||||
# default behaviour.
|
# default behavior.
|
||||||
-re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" {
|
-re "stdin/stdout redirected.*exec: non-existing-program: not found\r\nDuring startup program exited with code 127\.\r\nExiting\r\n" {
|
||||||
set saw_exiting 1
|
set saw_exiting 1
|
||||||
exp_continue
|
exp_continue
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ proc start_inferior { testname expect_reread } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gdb_assert { $expect_reread == $saw_reread } \
|
gdb_assert { $expect_reread == $saw_reread } \
|
||||||
"check symbol re-read behaviour"
|
"check symbol re-read behavior"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
using the LD_PRELOAD technique.
|
using the LD_PRELOAD technique.
|
||||||
|
|
||||||
The library intercepts calls to WAITPID and SIGSUSPEND in order to
|
The library intercepts calls to WAITPID and SIGSUSPEND in order to
|
||||||
simulate the behaviour of a heavily loaded kernel.
|
simulate the behavior of a heavily loaded kernel.
|
||||||
|
|
||||||
When GDB wants to stop all threads in an inferior each thread is sent a
|
When GDB wants to stop all threads in an inferior each thread is sent a
|
||||||
SIGSTOP, GDB will then wait for the signal to be received by the thread
|
SIGSTOP, GDB will then wait for the signal to be received by the thread
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
The idea in this library is to rate limit calls to waitpid (where pid is
|
The idea in this library is to rate limit calls to waitpid (where pid is
|
||||||
-1 and the WNOHANG option is set) so that only 1 per second can return
|
-1 and the WNOHANG option is set) so that only 1 per second can return
|
||||||
an answer. Any additional calls will report that no threads are
|
an answer. Any additional calls will report that no threads are
|
||||||
currently ready. This should match the behaviour we see on a slow
|
currently ready. This should match the behavior we see on a slow
|
||||||
kernel.
|
kernel.
|
||||||
|
|
||||||
However, given that usually when using this library, the kernel does
|
However, given that usually when using this library, the kernel does
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ init_readmore (int *method, unsigned int *sleep, FILE **log)
|
|||||||
*log = fopen (env, "w");
|
*log = fopen (env, "w");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Wrap 'read', and modify it's behaviour using READ1 or READMORE style. */
|
/* Wrap 'read', and modify it's behavior using READ1 or READMORE style. */
|
||||||
|
|
||||||
ssize_t
|
ssize_t
|
||||||
read (int fd, void *buf, size_t count)
|
read (int fd, void *buf, size_t count)
|
||||||
@@ -89,7 +89,7 @@ read (int fd, void *buf, size_t count)
|
|||||||
init_readmore (&readmore_method, &readmore_sleep, &log);
|
init_readmore (&readmore_method, &readmore_sleep, &log);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Only modify 'read' behaviour when reading from the terminal. */
|
/* Only modify 'read' behavior when reading from the terminal. */
|
||||||
if (isatty (fd) == 0)
|
if (isatty (fd) == 0)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ extern void execute_command (const char *, int);
|
|||||||
|
|
||||||
/* Run FN. Capture its output into the returned string, do not display it
|
/* Run FN. Capture its output into the returned string, do not display it
|
||||||
to the screen. The global BATCH_FLAG will temporarily be set to true.
|
to the screen. The global BATCH_FLAG will temporarily be set to true.
|
||||||
When TERM_OUT is true the output is collected with terminal behaviour
|
When TERM_OUT is true the output is collected with terminal behavior
|
||||||
(e.g. with styling). When TERM_OUT is false raw output will be collected
|
(e.g. with styling). When TERM_OUT is false raw output will be collected
|
||||||
(e.g. no styling). */
|
(e.g. no styling). */
|
||||||
|
|
||||||
|
|||||||
@@ -437,7 +437,7 @@ tui_register_info::rerender (WINDOW *handle, int field_width)
|
|||||||
|
|
||||||
/* Helper for "tui reg next", returns the next register group after
|
/* Helper for "tui reg next", returns the next register group after
|
||||||
CURRENT_GROUP in the register group list for GDBARCH, with wrap around
|
CURRENT_GROUP in the register group list for GDBARCH, with wrap around
|
||||||
behaviour.
|
behavior.
|
||||||
|
|
||||||
If CURRENT_GROUP is nullptr (e.g. if the tui register window has only
|
If CURRENT_GROUP is nullptr (e.g. if the tui register window has only
|
||||||
just been displayed and has no current group selected) or the currently
|
just been displayed and has no current group selected) or the currently
|
||||||
@@ -459,7 +459,7 @@ tui_reg_next (const reggroup *current_group, struct gdbarch *gdbarch)
|
|||||||
|
|
||||||
/* Helper for "tui reg prev", returns the register group previous to
|
/* Helper for "tui reg prev", returns the register group previous to
|
||||||
CURRENT_GROUP in the register group list for GDBARCH, with wrap around
|
CURRENT_GROUP in the register group list for GDBARCH, with wrap around
|
||||||
behaviour.
|
behavior.
|
||||||
|
|
||||||
If CURRENT_GROUP is nullptr (e.g. if the tui register window has only
|
If CURRENT_GROUP is nullptr (e.g. if the tui register window has only
|
||||||
just been displayed and has no current group selected) or the currently
|
just been displayed and has no current group selected) or the currently
|
||||||
|
|||||||
@@ -82,10 +82,10 @@ public:
|
|||||||
virtual bool isatty ()
|
virtual bool isatty ()
|
||||||
{ return false; }
|
{ return false; }
|
||||||
|
|
||||||
/* true indicates terminal output behaviour such as cli_styling.
|
/* true indicates terminal output behavior such as cli_styling.
|
||||||
This default implementation indicates to do terminal output
|
This default implementation indicates to do terminal output
|
||||||
behaviour if the UI_FILE is a tty. A derived class can override
|
behavior if the UI_FILE is a tty. A derived class can override
|
||||||
TERM_OUT to have cli_styling behaviour without being a tty. */
|
TERM_OUT to have cli_styling behavior without being a tty. */
|
||||||
virtual bool term_out ()
|
virtual bool term_out ()
|
||||||
{ return isatty (); }
|
{ return isatty (); }
|
||||||
|
|
||||||
@@ -171,9 +171,9 @@ class string_file : public ui_file
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/* Construct a string_file to collect 'raw' output, i.e. without
|
/* Construct a string_file to collect 'raw' output, i.e. without
|
||||||
'terminal' behaviour such as cli_styling. */
|
'terminal' behavior such as cli_styling. */
|
||||||
string_file () : m_term_out (false) {};
|
string_file () : m_term_out (false) {};
|
||||||
/* If TERM_OUT, construct a string_file with terminal output behaviour
|
/* If TERM_OUT, construct a string_file with terminal output behavior
|
||||||
such as cli_styling)
|
such as cli_styling)
|
||||||
else collect 'raw' output like the previous constructor. */
|
else collect 'raw' output like the previous constructor. */
|
||||||
explicit string_file (bool term_out) : m_term_out (term_out) {};
|
explicit string_file (bool term_out) : m_term_out (term_out) {};
|
||||||
|
|||||||
@@ -1183,7 +1183,7 @@ install_new_value (struct varobj *var, struct value *value, bool initial)
|
|||||||
changeable = varobj_value_is_changeable_p (var);
|
changeable = varobj_value_is_changeable_p (var);
|
||||||
|
|
||||||
/* If the type has custom visualizer, we consider it to be always
|
/* If the type has custom visualizer, we consider it to be always
|
||||||
changeable. FIXME: need to make sure this behaviour will not
|
changeable. FIXME: need to make sure this behavior will not
|
||||||
mess up read-sensitive values. */
|
mess up read-sensitive values. */
|
||||||
if (var->dynamic->pretty_printer != NULL)
|
if (var->dynamic->pretty_printer != NULL)
|
||||||
changeable = true;
|
changeable = true;
|
||||||
|
|||||||
@@ -1544,7 +1544,7 @@ parse_debug_options (const char *options)
|
|||||||
gdb_assert (options != nullptr);
|
gdb_assert (options != nullptr);
|
||||||
|
|
||||||
/* Empty options means the "default" set. This exists mostly for
|
/* Empty options means the "default" set. This exists mostly for
|
||||||
backwards compatibility with gdbserver's legacy behaviour. */
|
backwards compatibility with gdbserver's legacy behavior. */
|
||||||
if (*options == '\0')
|
if (*options == '\0')
|
||||||
options = "+threads";
|
options = "+threads";
|
||||||
|
|
||||||
|
|||||||
2
gdbsupport/aclocal.m4
vendored
2
gdbsupport/aclocal.m4
vendored
@@ -546,7 +546,7 @@ Oops!
|
|||||||
|
|
||||||
Your 'rm' program seems unable to run without file operands specified
|
Your 'rm' program seems unable to run without file operands specified
|
||||||
on the command line, even when the '-f' option is present. This is contrary
|
on the command line, even when the '-f' option is present. This is contrary
|
||||||
to the behaviour of most rm programs out there, and not conforming with
|
to the behavior of most rm programs out there, and not conforming with
|
||||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||||
|
|
||||||
Please tell bug-automake@gnu.org about your system, including the value
|
Please tell bug-automake@gnu.org about your system, including the value
|
||||||
|
|||||||
2
gdbsupport/configure
vendored
2
gdbsupport/configure
vendored
@@ -3515,7 +3515,7 @@ Oops!
|
|||||||
|
|
||||||
Your 'rm' program seems unable to run without file operands specified
|
Your 'rm' program seems unable to run without file operands specified
|
||||||
on the command line, even when the '-f' option is present. This is contrary
|
on the command line, even when the '-f' option is present. This is contrary
|
||||||
to the behaviour of most rm programs out there, and not conforming with
|
to the behavior of most rm programs out there, and not conforming with
|
||||||
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
|
||||||
|
|
||||||
Please tell bug-automake@gnu.org about your system, including the value
|
Please tell bug-automake@gnu.org about your system, including the value
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ parallel_for_each (unsigned n, RandomIt first, RandomIt last,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* A sequential drop-in replacement of parallel_for_each. This can be useful
|
/* A sequential drop-in replacement of parallel_for_each. This can be useful
|
||||||
when debugging multi-threading behaviour, and you want to limit
|
when debugging multi-threading behavior, and you want to limit
|
||||||
multi-threading in a fine-grained way. */
|
multi-threading in a fine-grained way. */
|
||||||
|
|
||||||
template<class RandomIt, class RangeFunction>
|
template<class RandomIt, class RangeFunction>
|
||||||
|
|||||||
Reference in New Issue
Block a user