Reporting Bugs in GDB
=====================
- There are several ways of reporting bugs in GDB. The prefered
+ There are several ways of reporting bugs in GDB. The preferred
method is to use the World Wide Web:
http://www.gnu.org/software/gdb/bugs/
/* Whether the stack has been set. This should be true when we notice a SP
to FP move or if we are using the SP as the base register for storing
- data, in case the FP is ommitted. */
+ data, in case the FP is omitted. */
bool seen_stack_set = false;
/* Track X registers and D registers in prologue. */
obj_type = obj->type ();
- /* It is the responsability of the caller to deref pointers. */
+ /* It is the responsibility of the caller to deref pointers. */
if (obj_type->code () == TYPE_CODE_PTR || obj_type->code () == TYPE_CODE_REF)
return obj;
No : Rec := (empty => True);
The size and contents of that record depends on the value of the
- descriminant (Rec.Empty). At this point, neither the debugging
+ discriminant (Rec.Empty). At this point, neither the debugging
information nor the associated type structure in GDB are able to
express such dynamic types. So what the debugger does is to create
"fixed" versions of the type that applies to the specific object.
return;
/* Compute the condition expression in text form, from the specific
- expection we want to catch. */
+ exception we want to catch. */
std::string cond_string
= ada_exception_catchpoint_cond_string (c->excep_string.c_str (), ex);
Note that we could use an observer of the inferior-created event
to make sure that the ada-tasks per-inferior data always exists.
- But we prefered this approach, as it avoids this entirely as long
+ But we preferred this approach, as it avoids this entirely as long
as the user does not use any of the tasking features. This is
quite possible, particularly in the case where the inferior does
not use tasking. */
/* For enum-valued ranges, we want to recurse, because we'll end
up printing the constant's name rather than its numeric
value. Character and fixed-point types are also printed
- differently, so recuse for those as well. */
+ differently, so recurse for those as well. */
struct type *target_type = type->target_type ();
val = value_cast (target_type, val);
common_val_print (val, stream, recurse + 1, options,
#include "alpha-tdep.h"
#include "alpha-bsd-tdep.h"
-/* Conviently, GDB uses the same register numbering as the
+/* Conveniently, GDB uses the same register numbering as the
ptrace register structure used by BSD on Alpha. */
void
regcache->invalidate (regno);
/* Invalidate all volatile registers if this register has the invalidate
- volatile property. For example, writting to VCC may change the content
+ volatile property. For example, writing to VCC may change the content
of STATUS.VCCZ. */
if (tdep->register_properties[regno]
& AMD_DBGAPI_REGISTER_PROPERTY_INVALIDATE_VOLATILE)
set_gdbarch_dummy_id (gdbarch, amd64_dummy_id);
/* Hook the function epilogue frame unwinder. This unwinder is
- appended to the list first, so that it supercedes the other
+ appended to the list first, so that it supersedes the other
unwinders in function epilogues. */
frame_unwind_prepend_unwinder (gdbarch, &amd64_epilogue_override_frame_unwind);
std::vector<const char *>
gdbarch_printable_names ()
{
- /* Accumulate a list of names based on the registed list of
+ /* Accumulate a list of names based on the registered list of
architectures. */
std::vector<const char *> arches;
extern CORE_ADDR default_get_return_buf_addr (struct type *val_typegdbarch,
frame_info_ptr cur_frame);
-/* Default implementation of gdbaarch default_dwarf2_omit_typedef_p method. */
+/* Default implementation of gdbarch default_dwarf2_omit_typedef_p method. */
extern bool default_dwarf2_omit_typedef_p (struct type *target_type,
const char *producer,
const char *name);
/* Under ARM GNU/Linux the traditional way of performing a breakpoint
is to execute a particular software interrupt, rather than use a
- particular undefined instruction to provoke a trap. Upon exection
+ particular undefined instruction to provoke a trap. Upon execution
of the software interrupt the kernel stops the inferior with a
SIGTRAP, and wakes the debugger. */
AVR_LAST_PUSHED_REGNUM = 17,
AVR_ARG1_REGNUM = 24, /* Single byte argument */
- AVR_ARGN_REGNUM = 25, /* Multi byte argments */
+ AVR_ARGN_REGNUM = 25, /* Multi byte arguments */
AVR_LAST_ARG_REGNUM = 8, /* Last argument register */
AVR_RET1_REGNUM = 24, /* Single byte return value */
return builtin_type (gdbarch)->builtin_uint8;
}
-/* Instruction address checks and convertions. */
+/* Instruction address checks and conversions. */
static CORE_ADDR
avr_make_iaddr (CORE_ADDR x)
return ((x) & 0xffffffff);
}
-/* SRAM address checks and convertions. */
+/* SRAM address checks and conversions. */
static CORE_ADDR
avr_make_saddr (CORE_ADDR x)
return ((x) & 0xffffffff);
}
-/* EEPROM address checks and convertions. I don't know if these will ever
+/* EEPROM address checks and conversions. I don't know if these will ever
actually be used, but I've added them just the same. TRoth */
/* TRoth/2002-04-08: Commented out for now to allow fix for problem with large
/* A comparison function for bp_location AP and BP being interfaced to
std::sort. Sort elements primarily by their ADDRESS (no matter what
bl_address_is_meaningful says), secondarily by ordering first
- permanent elements and terciarily just ensuring the array is sorted
+ permanent elements and tertiarily just ensuring the array is sorted
stable way despite std::sort being an unstable algorithm. */
static int
/* Name of shared threads library. */
static const char *bsd_uthread_solib_name;
-/* Non-zero if the thread startum implemented by this module is active. */
+/* Non-zero if the thread stratum implemented by this module is active. */
static int bsd_uthread_active;
static CORE_ADDR
build_id_bfd_get (bfd *abfd)
{
/* Dynamic objfiles such as ones created by JIT reader API
- have no underlaying bfd structure (that is, objfile->obfd
+ have no underlying bfd structure (that is, objfile->obfd
is NULL). */
if (abfd == nullptr)
return nullptr;
/* Cast the parent to the base' type. Note that in gdb,
expression like
(Base1)d
- will create an lvalue, for all appearences, so we don't
+ will create an lvalue, for all appearances, so we don't
need to use more fancy:
*(Base1*)(&d)
construct.
/* Create a minimal symbol entry for an exported forward symbol.
Return 1 if the forwarded function was found 0 otherwise.
SYM_NAME contains the exported name or NULL if exported by ordinal,
- FORWARD_DLL_NAME is the name of the DLL in which the target symobl resides,
+ FORWARD_DLL_NAME is the name of the DLL in which the target symbol resides,
FORWARD_FUNC_NAME is the name of the target symbol in that DLL,
ORDINAL is the ordinal index value of the symbol,
DLL_NAME is the internal name of the DLL file,
extern struct cmd_list_element *add_com_suppress_notification
(const char *name, enum command_class theclass,
cmd_simple_func_ftype *fun, const char *doc,
- bool *supress_notification);
+ bool *suppress_notification);
extern struct cmd_list_element *add_info (const char *,
cmd_simple_func_ftype *fun,
extern gdb::unique_xmalloc_ptr<char> cp_func_name (const char *full_name);
extern gdb::unique_xmalloc_ptr<char> cp_remove_params
- (const char *demanged_name);
+ (const char *demangled_name);
/* DEMANGLED_NAME is the name of a function, (optionally) including
parameters and (optionally) a return type. Return the name of the
/* Vector register has 128 bits, and only in ck810. Just return
csky_vector_type(), not check tdesc_has_registers(), is in case
- of some GDB stub does not describe type for Vector resgisters
+ of some GDB stub does not describe type for Vector registers
in the target-description-xml. */
if ((reg_nr >= CSKY_VR0_REGNUM) && (reg_nr <= CSKY_VR0_REGNUM + 15))
return csky_vector_type (gdbarch);
*) The call to strchr.
*) The addition of a partial symbol the two partial
symbol lists. This last is a large section of code, so
- I've imbedded it in the following macro. */
+ I've embedded it in the following macro. */
switch (nlist.n_type)
{
thread information block.
@item E @var{nn}
-An error occured. This means that either the thread was not found, or the
+An error occurred. This means that either the thread was not found, or the
address could not be retrieved.
@item @w{}
tags found in the requested memory range.
@item E @var{nn}
-An error occured. This means that fetching of memory tags failed for some
+An error occurred. This means that fetching of memory tags failed for some
reason.
@item @w{}
accordingly.
@item E @var{nn}
-An error occured. This means that modifying the memory tag granules failed
+An error occurred. This means that modifying the memory tag granules failed
for some reason.
@item @w{}
@item F @var{result} [, @var{errno}] [; @var{attachment}]
@var{result} is the integer value returned by this operation, usually
-non-negative for success and -1 for errors. If an error has occured,
+non-negative for success and -1 for errors. If an error has occurred,
@var{errno} will be included in the result specifying a
value defined by the File-I/O protocol (@pxref{Errno Values}). For
operations which return data, @var{attachment} supplies the data as a
@item --batch-silent
Run in batch mode, just like @option{--batch}, but totally silent. All @value{GDBN}
-output is supressed (stderr is unaffected). This is much quieter than
+output is suppressed (stderr is unaffected). This is much quieter than
@option{--silent} and would be useless for an interactive session.
This is particularly useful when using targets that give @samp{Loading section}
(define reason (frame-unwind-stop-readon (selected-frame)))
(define reason-str (unwind-stop-reason-string reason))
(if (>= reason FRAME_UNWIND_FIRST_ERROR)
- (format #t "An error occured: ~s\n" reason-str))
+ (format #t "An error occurred: ~s\n" reason-str))
@end smallexample
@end table
@end deffn
In all cases, your exception handler will see the @value{GDBN} error
message as its value and the Python call stack backtrace at the Python
-statement closest to where the @value{GDBN} error occured as the
+statement closest to where the @value{GDBN} error occurred as the
traceback.
A boolean indicating whether the instruction was executed speculatively.
@end defvar
-If an error occured during recording or decoding a recording, this error is
+If an error occurred during recording or decoding a recording, this error is
represented by a @code{gdb.RecordGap} object in the instruction list. It has
the following attributes:
reason = gdb.selected_frame().unwind_stop_reason ()
reason_str = gdb.frame_stop_reason_string (reason)
if reason >= gdb.FRAME_UNWIND_FIRST_ERROR:
- print ("An error occured: %s" % reason_str)
+ print ("An error occurred: %s" % reason_str)
@end smallexample
@end table
: offset_in_dwz {}, m_comp_dir (comp_dir)
{}
- /* This constructor should only be used to create line_header intances to do
+ /* This constructor should only be used to create line_header instances to do
hash table lookups. */
line_header (sect_offset sect_off, bool offset_in_dwz)
: sect_off (sect_off),
same. This is a shallow traversal and it is not bullet-proof;
the compiler can trick the debugger into believing that the trees
are isomorphic, whereas they actually are not. However, the
- likelyhood of this happening is pretty low, and a full-fledged
+ likelihood of this happening is pretty low, and a full-fledged
check would be an overkill. */
bool are_isomorphic = true;
die_info *concrete_child = die->child;
if (child_type != NULL)
{
- /* The range type was succesfully read. Save it for the
+ /* The range type was successfully read. Save it for the
array type creation. */
range_types.push_back (child_type);
}
DW_AT_specification // refers to die #3
Thus, when processing die #4, we have to pretend that we're in
- the context of its DW_AT_specification, namely the contex of die
+ the context of its DW_AT_specification, namely the context of die
#3. */
spec_cu = cu;
spec_die = die_specification (die, &spec_cu);
<!DOCTYPE target SYSTEM "gdb-target.dtd">
<target>
<!-- This description is slightly different from the standard
- org.gnu.gdb.power.core, to accomodate mq. -->
+ org.gnu.gdb.power.core, to accommodate mq. -->
<feature name="org.gnu.gdb.power.core">
<reg name="r0" bitsize="32"/>
<reg name="r1" bitsize="32"/>
<architecture>rs6000:6000</architecture>
<!-- This description is slightly different from the standard
- org.gnu.gdb.power.core, to accomodate mq, cnd, and cnt. -->
+ org.gnu.gdb.power.core, to accommodate mq, cnd, and cnt. -->
<feature name="org.gnu.gdb.power.core">
<reg name="r0" bitsize="32"/>
<reg name="r1" bitsize="32"/>
</feature>
<!-- This description is slightly different from the standard
- org.gnu.gdb.power.core, to accomodate historical numbering
+ org.gnu.gdb.power.core, to accommodate historical numbering
for fpscr. -->
<feature name="org.gnu.gdb.power.fpu">
<reg name="f0" bitsize="64" type="ieee_double" regnum="32"/>
extern CORE_ADDR get_frame_base (frame_info_ptr);
-/* Return the per-frame unique identifer. Can be used to relocate a
+/* Return the per-frame unique identifier. Can be used to relocate a
frame after a frame cache flush (and other similar operations). If
FI is NULL, return the null_frame_id. */
extern struct frame_id get_frame_id (frame_info_ptr fi);
struct value *val = nullptr;
/* String containing the error message, it is more usually NULL indicating no
- error occured reading this parameter. */
+ error occurred reading this parameter. */
gdb::unique_xmalloc_ptr<char> error;
/* One of the print_entry_values_* entries as appropriate specifically for
bfd *obfd, gdb::unique_xmalloc_ptr<char> *note_data, int *note_size);
/* Add content to *NOTE_DATA (and update *NOTE_SIZE) to include a note
- containing the current targtet's target description. The core file is
+ containing the current target's target description. The core file is
being written to OBFD. If something goes wrong then *NOTE_DATA can be
set to nullptr. */
The more traditional mega-struct containing architecture specific
data for all the various GDB components was also considered. Since
GDB is built from a variable number of (fairly independent)
- components it was determined that the global aproach was not
+ components it was determined that the global approach was not
applicable. */
/* Helper function. Free a partially-constructed ``struct gdbarch''.
- It is assumed that the caller freeds the ``struct
+ It is assumed that the caller frees the ``struct
gdbarch_tdep''. */
extern void gdbarch_free (struct gdbarch *);
of the possible command languages. If necessary, a hook (that may be
present or not) must be used and set to the appropriate routine by any
command language that cares about it. If you are having to include this
- file you are possibly doing things the old way. This file will dissapear.
+ file you are possibly doing things the old way. This file will disappear.
fnasser@redhat.com */
/* Header file for GDB-specific command-line stuff.
TYPE can be either a struct or union, or a pointer or reference to
a struct or union. If it is a pointer or reference, its target
- type is automatically used. Thus '.' and '->' are interchangable,
+ type is automatically used. Thus '.' and '->' are interchangeable,
as specified for the definitions of the expression element types
STRUCTOP_STRUCT and STRUCTOP_PTR.
TYPE can be either a struct or union, or a pointer or reference to
a struct or union. If it is a pointer or reference, its target
- type is automatically used. Thus '.' and '->' are interchangable,
+ type is automatically used. Thus '.' and '->' are interchangeable,
as specified for the definitions of the expression element types
STRUCTOP_STRUCT and STRUCTOP_PTR.
/* Do the export into a buffer allocated by GMP itself; that way,
we can detect cases where BUF is not large enough to export
- our value, and thus avoid a buffer overlow. Normally, this should
+ our value, and thus avoid a buffer overflow. Normally, this should
never happen, since we verified earlier that the buffer is large
- enough to accomodate our value, but doing this allows us to be
+ enough to accommodate our value, but doing this allows us to be
extra safe with the export.
After verification that the export behaved as expected, we will
/* The inferior used for all gdb target ops. */
struct inf *gnu_current_inf = 0;
-/* The inferior being waited for by gnu_wait. Since GDB is decidely not
+/* The inferior being waited for by gnu_wait. Since GDB is decidedly not
multi-threaded, we don't bother to lock this. */
static struct inf *waiting_inf;
else if (kind == TARGET_WAITKIND_STOPPED
&& w->status.sig () == GDB_SIGNAL_TRAP)
/* Ah hah! A SIGTRAP from the inferior while starting up probably
- means we've succesfully completed an exec! */
+ means we've successfully completed an exec! */
{
inf_debug (inf, "one pending exec completed");
}
space, it will be freed with the smob. */
const char * const *enumeration;
- /* The set_func funcion or #f if not specified.
+ /* The set_func function or #f if not specified.
This function is called *after* the parameter is set.
It returns a string that will be displayed to the user. */
SCM set_func;
set_gdbarch_fetch_pointer_argument (gdbarch, i386_fetch_pointer_argument);
/* Hook the function epilogue frame unwinder. This unwinder is
- appended to the list first, so that it supercedes the DWARF
+ appended to the list first, so that it supersedes the DWARF
unwinder in function epilogues (where the DWARF unwinder
currently fails). */
if (info.bfd_arch_info->bits_per_word == 32)
/* Segment selectors. */
#define I386_SEL_RPL 0x0003 /* Requester's Privilege Level mask. */
-#define I386_SEL_UPL 0x0003 /* User Privilige Level. */
-#define I386_SEL_KPL 0x0000 /* Kernel Privilige Level. */
+#define I386_SEL_UPL 0x0003 /* User Privilege Level. */
+#define I386_SEL_KPL 0x0000 /* Kernel Privilege Level. */
/* The length of the longest i386 instruction (according to
include/asm-i386/kprobes.h in Linux 2.6. */
class frame_info_ptr;
struct regcache;
-/* A struction containing pointers to all the target-dependent operations
+/* A struct containing pointers to all the target-dependent operations
performed to setup an inferior function call. */
struct ia64_infcall_ops
/* Get the return value. */
retval = sm->return_value;
- /* Restore the original FSM and clean up / destroh the call FSM.
+ /* Restore the original FSM and clean up / destroy the call FSM.
Doing it in this order ensures that if the call to clean_up
throws, the original FSM is properly restored. */
{
/* Notify the interpreter that the current inferior has stopped normally. */
virtual void on_normal_stop (bpstat *bs, int print_frame) {}
- /* Notify the intepreter that the current inferior has exited normally with
+ /* Notify the interpreter that the current inferior has exited normally with
status STATUS. */
virtual void on_exited (int status) {}
{ return false; }
/* Is this language case sensitive? The return value from this function
- provides the automativ setting for 'set case-sensitive', as a
+ provides the automatic setting for 'set case-sensitive', as a
consequence, a user is free to override this setting if they want. */
virtual enum case_sensitivity case_sensitivity () const
lai->set_bool_type (builtin->builtin_bool, "BOOLEAN");
}
-/* See languge.h. */
+/* See language.h. */
void
m2_language::printchar (int c, struct type *type,
freeing it, using xfree.
We need this expand-one-token-at-a-time interface in order to
- accomodate GDB's C expression parser, which may not consume the
+ accommodate GDB's C expression parser, which may not consume the
entire string. When the user enters a command like
(gdb) break *func+20 if x == 5
line info, but not in macro info. This means that GDB's symtabs
(built from the former, among other things) may mention filenames
that the #inclusion tree (built from the latter) doesn't have any
- record of. See macroscope.c:sal_macro_scope for how to accomodate
+ record of. See macroscope.c:sal_macro_scope for how to accommodate
this.
It's worth noting that libcpp has a simpler way of representing all
typename = re.sub("[ ()<>:]", "_", typename)
typename = re.sub("[*]", "p", typename)
typename = re.sub("&", "r", typename)
- # Identifers with double underscores are reserved to the C++
+ # Identifiers with double underscores are reserved to the C++
# implementation.
typename = re.sub("_+", "_", typename)
# Avoid ending the function name with underscore, for
pst->legacy_expand_psymtab = mdebug_expand_psymtab;
/* Set up language for the pst.
- The language from the FDR is used if it is unambigious (e.g. cfront
+ The language from the FDR is used if it is unambiguous (e.g. cfront
with native cc and g++ will set the language to C).
Otherwise we have to deduce the language from the filename.
Native ecoff has every header file in a separate FDR, so
#define MI_MI_COMMON_H
/* Represents the reason why GDB is sending an asynchronous command to
- the front end. NOTE: When modifing this, don't forget to update
+ the front end. NOTE: When modifying this, don't forget to update
gdb.texinfo! */
enum async_reply_reason
{
In older ABIs, the caller reserved space for
registers that contained arguments. This was loosely
- refered to as their "home". Consequently, space is
+ referred to as their "home". Consequently, space is
always allocated. */
stack_offset += align_up (partial_len, MIPS32_REGSIZE);
In older ABIs, the caller reserved space for
registers that contained arguments. This was loosely
- refered to as their "home". Consequently, space is
+ referred to as their "home". Consequently, space is
always allocated. */
stack_offset += align_up (partial_len, MIPS64_REGSIZE);
EXCLUDES entries, the last entry is NULL. */
const char *excludes[1];
- /* Returns true if the using_direcive USING_DIR is valid in CURR_LINE.
+ /* Returns true if the using_directive USING_DIR is valid in CURR_LINE.
Because current GCC (at least version 12.2) sets the decl_line as
the last line in the current block, we need to take this into
consideration when checking the validity, by comparing it to
{
gdb_assert (dr_ref_count[i] == 0);
idx = i;
- /* no break; continue hunting for an exising one. */
+ /* no break; continue hunting for an existing one. */
}
else if (dr_addr_p[i] == addr
&& (dr_addr_orig_p == nullptr || dr_addr_orig_p[i] == addr_orig)
static size_t
get_core_array_size ()
{
- /* Using /sys/.../possible is prefered, because it handles the case where
+ /* Using /sys/.../possible is preferred, because it handles the case where
we are in a container that has access to a subset of the host's cores.
It will return a size that considers all the CPU cores available to the
host. If that fials for some reason, fall back to sysconf. */
ptrace (PTRACE_TRACEME, 0, (PTRACE_TYPE_ARG3) 0, (PTRACE_TYPE_ARG4) 0);
kill (getpid (), SIGSTOP);
- /* This code is only reacheable by the child (grandchild's parent)
+ /* This code is only reachable by the child (grandchild's parent)
process. */
_exit (0);
}
/* Define the general register mapping. The kernel and GDB put registers
r1 to r31 in the same place. The NPC register is stored at index 32 in
- linux and 33 in GDB, in GDB 32 is for PPC which is not popupated from linux.
+ linux and 33 in GDB, in GDB 32 is for PPC which is not populated from linux.
Register r0 is always 0 and can be ignored. */
static const struct regcache_map_entry or1k_linux_gregmap[] =
UNAVAILABLE can indicate that the kernel doesn't support any of the
two sets of requests or that there was an error when we tried to
- detect wich interface is available. */
+ detect which interface is available. */
enum debug_reg_interface
{
perror_with_name (_("Error deleting hardware "
"breakpoint or watchpoint"));
- /* We erase the entries one at a time after successfuly
+ /* We erase the entries one at a time after successfully
removing the corresponding slot form the thread so that
if we throw an exception above in a future iteration the
map remains consistent. */
#ifdef TUI
{ "register_window_type", (PyCFunction) gdbpy_register_tui_window,
METH_VARARGS | METH_KEYWORDS,
- "register_window_type (NAME, CONSTRUCSTOR) -> None\n\
+ "register_window_type (NAME, CONSTRUCTOR) -> None\n\
Register a TUI window constructor." },
#endif /* TUI */
/* WARNING: This threadref data structure comes from the remote O.S.,
libstub protocol encoding, and remote.c. It is not particularly
- changable. */
+ changeable. */
/* Right now, the internal structure is int. We want it to be bigger.
Plan to fix this. */
getpkt (&rs->buf, 0);
- /* If an error occured, warn, but do not return - just reset the
+ /* If an error occurred, warn, but do not return - just reset the
buffer to empty and go on to disable features. */
if (m_features.packet_ok (rs->buf, PACKET_qSupported) == PACKET_ERROR)
{
follow_child, detach_fork);
/* If we detach fork and follow child we do not want the child
- process to geneate events that ptrace can trace. Hence we
+ process to generate events that ptrace can trace. Hence we
detach it. */
if (detach_fork && !follow_child)
}
catch (const gdb_exception_error &e)
{
- /* An error occured during reading. Probably a memory error
+ /* An error occurred during reading. Probably a memory error
due to the section not being loaded yet. This address
cannot be a function descriptor. */
return addr;
valid_p &= tdesc_numbered_register (feature, tdesc_data.get (),
PPC_XER_REGNUM, "xer");
- /* Allow alternate names for these registers, to accomodate GDB's
+ /* Allow alternate names for these registers, to accommodate GDB's
historic naming. */
valid_p &= tdesc_numbered_register_choices (feature, tdesc_data.get (),
PPC_MSR_REGNUM, msr_names);
if (event_index != WAIT_OBJECT_0 + 1)
{
- /* Wait must have failed; assume an error has occured, e.g.
+ /* Wait must have failed; assume an error has occurred, e.g.
the handle has been closed. */
SetEvent (state->except_event);
break;
if (event_index != WAIT_OBJECT_0 + 1)
{
- /* Some error has occured. Assume that this is an error
+ /* Some error has occurred. Assume that this is an error
condition. */
SetEvent (state->base.except_event);
break;
probes-based interface.
The namespace is represented by the address of its corresponding
- r_debug[_ext] object. We get the namespace id as agrument to the
+ r_debug[_ext] object. We get the namespace id as argument to the
'reloc_complete' probe but we don't get it when scanning the load map
on attach.
covers one namespace.
We expect gdbserver to provide updates for the namespace that
- contains LM, which whould be this namespace... */
+ contains LM, which would be this namespace... */
so_list *sos = nullptr;
if (library_list.solib_lists.find (debug_base)
!= library_list.solib_lists.end ())
whose e_type member in the ELF header is not ET_DYN. There may
be a time in the future when it is desirable to do relocations
on other types of files as well in which case this condition
- should either be removed or modified to accomodate the new file
+ should either be removed or modified to accommodate the new file
type. - Kevin, Nov 2000. ] */
static int
/* Upon entry the value for LR to save has been pushed.
We unpush that so that the value for the stack pointer saved is correct.
Upon entry, all other registers are assumed to have not been modified
- since the interrupt/trap occured. */
+ since the interrupt/trap occurred. */
asm ("\n\
stash_registers:\n\
movew sp@+,a1@+
dbf d0,saveFrameLoop
#
-# now that the stack has been clenaed,
+# now that the stack has been cleaned,
# save the a7 in use at time of exception
movel sp,_superStack /* save supervisor sp */
andiw #0x2000,d1 /* were we in supervisor mode ? */
if (n == CPU_BUS_ERROR_VEC)
{
- /* Exception 9 (bus errors) are disasbleable - so that you
+ /* Exception 9 (bus errors) are disableable - so that you
can probe memory and get zero instead of a fault.
Because the vector table may be in ROM we don't revector
the interrupt like all the other stubs, we check in here
#define DBG_NMI_EX EX_HWBREAK
#define DBG_INT_EX EX_SIGINT
-/* Define following macro to statement, which will be exectuted after entering to
+/* Define following macro to statement, which will be executed after entering to
stub_main function. Statement should include semicolon. */
//#define DBG_ENTER debug_enter();
if (buffer[5] == '?')
{
/* result response will be "vCont;c;C"; C action must be
- supported too, because GDB reguires at lease both of them */
+ supported too, because GDB requires at lease both of them */
memcpy (&buffer[5], ";c;C", 5);
return 0;
}
/* This is where things get really weird... We MUST have valid
indices for the various sect_index_* members or gdb will abort.
So if for example, there is no ".text" section, we have to
- accomodate that. First, check for a file with the standard
+ accommodate that. First, check for a file with the standard
one or two segments. */
symfile_find_segment_sections (objfile);
/* Provide defaults for hardware watchpoint functions. */
-/* If the *_hw_beakpoint functions have not been defined
+/* If the *_hw_breakpoint functions have not been defined
elsewhere use the definitions in the target vector. */
/* Returns positive if we can set a hardware watchpoint of type TYPE.
should be resuming the inferior. */
TARGET_WAITKIND_SPURIOUS,
- /* An event has occured, but we should wait again.
+ /* An event has occurred, but we should wait again.
Remote_async_wait() returns this when there is an event
on the inferior, but the rest of the world is not interested in
it. The inferior has not stopped, but has just sent some output
gdb_test "info reg ev$i" "ev$i.*$vector_register" "info reg ev$i"
}
-# Test wether the GPRs are updated accordingly. (GPRs are just the lower
+# Test whether the GPRs are updated accordingly. (GPRs are just the lower
# 32 bits of the EV registers.)
set general_register "0x1\[ \t\]+1"
/* This file was generated from glibc's 2.31 _exit.c, by doing a glibc build
on ppc64le-linux, copying the command line, adding -g0 -save-temps and
- recuding the _exit.i file. */
+ reducing the _exit.i file. */
void _exit (int status);
# It'd be nicer/safer to restart GDB on each iteration, but, that
# increases the testcase's run time several times fold. At the time
-# of writting, it'd jump from 20s to 4min on x86-64 GNU/Linux with
+# of writing, it'd jump from 20s to 4min on x86-64 GNU/Linux with
# --enable-targets=all.
set num_slices 8
the file for unmodified pages - while others handle this poorly -
writing out all pages including those that weren't modified. */
- print_string ("Alocating the entire heap ...\n");
+ print_string ("Allocating the entire heap ...\n");
{
size_t chunk_size;
unsigned long chunks_allocated = 0;
# Overwrite memory where the breakpoint is planted. GDB should update
# its memory breakpoint's shadows, to account for the new contents,
# and still leave the breakpoint insn planted. Try twice with
-# different values, in case we happen to be writting exactly what was
+# different values, in case we happen to be writing exactly what was
# there already.
foreach test_value {0 1} {
set write_test "write $test_value to breakpoint's address"
* -- call print_long_arg_list from inside print_small_structs
***************************************************************************/
-/* Some enumerated types -- used to test that the structureal data type is
+/* Some enumerated types -- used to test that the structural data type is
* retrieved for function arguments with typedef data types.
*/
typedef int id_int;
gdb_test "restore" "You can't do that without a process to debug\."
#test return
-# The middle case accomodated the obsolete a29k, where doing the "ni"
+# The middle case accommodated the obsolete a29k, where doing the "ni"
# above causes an initial stack to be created.
gdb_test "return" "No selected frame..*"
# purpose of this checking is to ensure that the variables are
# mutually exclusive, i.e., that when $_exitsignal is set, $_exitcode
# is not, and vice-versa. This mutual exclusion happens because if an
-# inferior exited (either successfuly or not), it certainly was not
+# inferior exited (either successfully or not), it certainly was not
# killed by a signal. However, if it was killed by an uncaught
# signal, then there is no way for it to have exited.
set reading_re "(Reading.*from remote target\\.\\.\\.\r\n)*"
set exited_normally_re "${reading_re}\\\[Inferior $decimal \\(.*\\) exited normally\\\]"
# gdbserver produces a slightly different message when attaching after
-# a fork, so we have to tweak the regexp to accomodate that.
+# a fork, so we have to tweak the regexp to accommodate that.
set attach_child_re "${reading_re}\\\[Attaching after .* fork to child .*\\\]\r\n"
set detach_child_re "${reading_re}\\\[Detaching after fork from child .*\\\]\r\n"
set detach_parent_re "${reading_re}\\\[Detaching after fork from parent .*\\\]\r\n"
int i96 = useit (96), i97 = useit (97), i98 = useit (98);
int i99 = useit (99);
- /* Use all 100 of the local variables to derail agressive optimizers. */
+ /* Use all 100 of the local variables to derail aggressive optimizers. */
useit ( i0); useit ( i1); useit ( i2); useit ( i3); useit ( i4);
useit ( i5); useit ( i6); useit ( i7); useit ( i8); useit ( i9);
# We try all combinations, even those that don't
# parse, or are invalid, to catch the case of a
# regression making them inadvertently valid. For
- # example, these convertions are invalid:
+ # example, these conversions are invalid:
#
# float <-> array [iff sizeof pointer != sizeof float]
# array -> function (not function pointer)
void operator delete[] (void* ptr) { // base::operator delete[]
free (ptr); }
- base const* operator-> (void) const { // base::opeartor->
+ base const* operator-> (void) const { // base::operator->
return this; }
int operator->* (base const& b) const { // base::operator->*
free (p);
}
-/* 1. A standard covnersion sequence is better than a user-defined sequence
+/* 1. A standard conversion sequence is better than a user-defined sequence
which is better than an elipses conversion sequence. */
class A{};
return foo2(b); // 13
}
-/* 2. Standard Conversion squence S1 is better than standard Conversion
+/* 2. Standard Conversion sequence S1 is better than standard Conversion
S2 if: */
// - S1 has a better rank than S2
}
// - S1 and S2 have the same rank but:
-// - S2 is a conversion of pointer or memeber-pointer to bool
+// - S2 is a conversion of pointer or member-pointer to bool
int foo5 (bool) { return 25; }
int foo5 (void*) { return 26; }
int test5 () {
# along with this program. If not, see <http://www.gnu.org/licenses/> .
# Print a 2 dimensional assumed shape array. We pass different slices
-# of the array to a subroutine and print the array as recieved within
+# of the array to a subroutine and print the array as received within
# the subroutine. This should exercise GDB's ability to handle
# different strides for the different dimensions.
gdb_test_no_output "set follow-exec-mode $mode"
- # Test that GDB updates the target description / arch successfuly
+ # Test that GDB updates the target description / arch successfully
# after the exec.
gdb_test "continue" "Breakpoint $bkptno_numopt_re, main.*" "continue across exec that changes architecture"
}
# Test gdb.solib_name
gdb_test "p &func1" "" "func1 address"
-gdb_py_test_silent_cmd "python func1 = gdb.history(0)" "Aquire func1 address" 1
+gdb_py_test_silent_cmd "python func1 = gdb.history(0)" "Acquire func1 address" 1
gdb_test "python print (gdb.solib_name(int(func1)))" "py-shared-sl.sl" \
"test func1 solib location"
gdb_test "python print (gdb.solib_name(func1))" "py-shared-sl.sl" \
"test func1 solib location using Value"
gdb_test "p &main" "" "main address"
-gdb_py_test_silent_cmd "python main = gdb.history(0)" "Aquire main address" 1
+gdb_py_test_silent_cmd "python main = gdb.history(0)" "Acquire main address" 1
gdb_test "python print (gdb.solib_name(int(main)))" "None" "test main solib location"
if {[is_lp64_target]} {
return t1 * t;
}
-} // namespaxe dop
+} // namespace dop
using namespace dop;
# Test PR 12212, using InfThread.selected_thread() when no inferior is
# loaded.
-gdb_py_test_silent_cmd "python nothread = gdb.selected_thread()" "Attempt to aquire thread with no inferior" 1
+gdb_py_test_silent_cmd "python nothread = gdb.selected_thread()" "Attempt to acquire thread with no inferior" 1
gdb_test "python print (nothread is None)" "True" "ensure that no threads are returned"
gdb_test_multiline "register atexit function" \
gdb_breakpoint "main thread $start_thre"
gdb_test "info break" ".*breakpoint.*thread $start_thre" "breakpoint set"
- # Set breakpoint at a place only reacheable after the "start"
+ # Set breakpoint at a place only reachable after the "start"
# thread exits.
gdb_breakpoint "end"
# Test that all the substring prefixes of INPUT from [0..START) to
# [0..END) complete to COMPLETION_RE (a regular expression). If END
-# is ommitted, default to the length of INPUT.
+# is omitted, default to the length of INPUT.
proc test_complete_prefix_range_re {input completion_re start {end -1}} {
if {$end == -1} {
}
# Test that all the substring prefixes of COMPLETION from [0..START)
-# to [0..END) complete to COMPLETION. If END is ommitted, default to
+# to [0..END) complete to COMPLETION. If END is omitted, default to
# the length of COMPLETION.
proc test_complete_prefix_range {completion start {end -1}} {
#
# Both inferior and gdb patterns must match for a PASS.
#
-# If MESSAGE is ommitted, then COMMAND will be used as the message.
+# If MESSAGE is omitted, then COMMAND will be used as the message.
#
# Returns:
# 1 if the test failed,
}
# Copy SRC to DEST, resolving any symlinks in SRC. Return nonzero iff
-# the copy was succesful.
+# the copy was successful.
#
# This function is guaranteed to never raise any exception, even when the copy
# fails.
# depend on system libraries. To properly prelink an executable, all
# of its dynamically linked libraries must be prelinked as well. If
# the executable depends on some system libraries, we may not have
-# sufficient write priviledges on these files to perform the prelink.
+# sufficient write privileges on these files to perform the prelink.
# This is why we make a copy of these shared libraries, and link the
# executable against these copies instead.
#
/* Default READMORE sleep time in miliseconds. */
#define READMORE_SLEEP_DEFAULT 10
-/* Helper function. Intialize *METHOD according to environment variable
+/* Helper function. Initialize *METHOD according to environment variable
READMORE_METHOD, and *SLEEP according to environment variable
READMORE_SLEEP. */
}
/* Get the register value from the given frame and format it for the
- display. When changep is set, check if the new register value has
+ display. When changedp is set, check if the new register value has
changed with respect to the previous call. */
static void
tui_get_register (frame_info_ptr frame,
tui_wrefresh (handle.get ());
}
-/* Draw a border arround the window. */
+/* Draw a border around the window. */
static void
box_win (struct tui_win_info *win_info,
bool highlight_flag)
}
-/* Function to ensure that the source and/or disassemly windows
+/* Function to ensure that the source and/or disassembly windows
reflect the input address. */
void
tui_update_source_windows_with_addr (struct gdbarch *gdbarch, CORE_ADDR addr)
rl_newline (1, '\n');
/* Switch to gdb command mode while executing the command.
- This way the gdb's continue prompty will be displayed. */
+ This way the gdb's continue prompt will be displayed. */
tui_set_key_mode (TUI_ONE_COMMAND_MODE);
return 0;
}
/* The offset to be applied to bitpos when PRINT_OFFSETS is true.
This is needed for when we are printing nested structs and want
to make sure that the printed offset for each field carries over
- the offset of the outter struct. */
+ the offset of the outer struct. */
unsigned int offset_bitpos = 0;
/* END_BITPOS is the one-past-the-end bit position of the previous
This function limits itself to values which are in range (out-of-range
values will be tested separately). In doing so, it tries to be reasonably
- exhaustive, by testing the edges, as well as a resonable set of values
+ exhaustive, by testing the edges, as well as a reasonable set of values
including negative ones, zero, and positive values. */
static void
}
} /* namespace vector_utils_tests */
-} /* amespace selftests */
+} /* namespace selftests */
void _initialize_vec_utils_selftests ();
void
/* We copy over the enclosing type and pointed-to offset from FROMVAL
in the case of pointer types. For object types, the enclosing type
- and embedded offset must *not* be copied: the target object refered
+ and embedded offset must *not* be copied: the target object referred
to by TOVAL retains its original dynamic type after assignment. */
if (type->code () == TYPE_CODE_PTR)
{
{
/* The varobj is tied to a block which is going away. There is
no way to reconstruct something later, so invalidate the
- varobj completly and drop the reference to the block which is
+ varobj completely and drop the reference to the block which is
being freed. */
var->root->is_valid = false;
var->root->valid_block = nullptr;
if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
return regcache->raw_read (regnum, buffer);
- /* We have to find out how to deal with priveleged registers.
+ /* We have to find out how to deal with privileged registers.
Let's treat them as pseudo-registers, but we cannot read/write them. */
else if (tdep->call_abi == CallAbiCall0Only
if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
regcache->raw_write (regnum, buffer);
- /* We have to find out how to deal with priveleged registers.
+ /* We have to find out how to deal with privileged registers.
Let's treat them as pseudo-registers, but we cannot read/write them. */
else if (regnum < tdep->a0_base)
break_insn[0] = kind | 0307;
*size = 1;
}
- else /* kind is non-RST address, use CALL instead, but it is dungerous */
+ else /* kind is non-RST address, use CALL instead, but it is dangerous */
{
z80_gdbarch_tdep *tdep = gdbarch_tdep<z80_gdbarch_tdep> (gdbarch);
gdb_byte *p = break_insn;
}
/* Cache the stack top in its own variable. Much of the time we can
- operate on this variable, rather than dinking with the stack. It
+ operate on this variable, rather than syncing with the stack. It
needs to be copied to the stack when sp changes. */
top = 0;
/* Private target data. */
struct process_info_private *priv = NULL;
- /* DLLs thats are loaded for this proc. */
+ /* DLLs that are loaded for this proc. */
std::list<dll_info> all_dlls;
/* Flag to mark that the DLL list has changed. */
/* Currently ARC Linux ptrace doesn't allow writes to status32 because
some of its bits are kernel mode-only and shoudn't be writable from
user-space. Writing status32 from debugger could be useful, though,
- so ability to write non-priviliged bits will be added to kernel
+ so ability to write non-privileged bits will be added to kernel
sooner or later. */
/* BTA. */
static struct regs_info csky_regs_info =
{
NULL, /* FIXME: what's this */
- NULL, /* PEEKUSER/PORKUSR isn't supported by kernel > 4.x */
+ NULL, /* PEEKUSER/POKEUSR isn't supported by kernel > 4.x */
&csky_regsets_info
};
/* Regardless of endian, register 3 is always high part, 4 is low part.
These defines are used when the register pair is stored/loaded.
- Likewise, to simplify code, have a similiar define for 5:6. */
+ Likewise, to simplify code, have a similar define for 5:6. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define TOP_FIRST "4"
software breakpoints, a buffer holding a copy of the instructions
that would be in memory had not been a breakpoint there (we call
that the shadow memory of the breakpoint). We occasionally need to
- temporarilly uninsert a breakpoint without the client knowing about
+ temporarily uninsert a breakpoint without the client knowing about
it (e.g., to step over an internal breakpoint), so we keep an
`inserted' state associated with this low level breakpoint
structure. There can only be one such object for a given address.
we would not burden it with a thread status response. This
was for the benefit of GDB 4.13 and older. However, in
recent GDB versions the check (``if (cont_thread != 0)'')
- does not have the desired effect because of sillyness in
+ does not have the desired effect because of silliness in
the way that the remote protocol handles specifying a
thread. Since thread support relies on qSymbol support
anyway, assume GDB can handle threads. */
}
/* Resume thread and wait for another event. In non-stop mode,
- don't really wait here, but return immediatelly to the event
+ don't really wait here, but return immediately to the event
loop. */
static void
myresume (char *own_buf, int step, int sig)
#define MAXBUFBYTES(N) (((N)-32)/2)
/* Buffer sizes for transferring memory, registers, etc. Set to a constant
- value to accomodate multiple register formats. This value must be at least
+ value to accommodate multiple register formats. This value must be at least
as large as the largest register set supported by gdbserver. */
#define PBUFSIZ 18432
unsigned int prev, counter;
/* Update the token, with new counters, and the GDBserver stamp
- bit. Alway reuse the current TBC index. */
+ bit. Always reuse the current TBC index. */
prev = ipa_trace_buffer_ctrl_curr & GDBSERVER_FLUSH_COUNT_MASK_CURR;
counter = (prev + 0x100) & GDBSERVER_FLUSH_COUNT_MASK_CURR;
if (e == ERROR_PIPE_NOT_CONNECTED)
{
- /* This will happen if the loader fails to succesfully
+ /* This will happen if the loader fails to successfully
load the application, e.g., if the main executable
tries to pull in a non-existing export from a
DLL. */
Say a developer starts out with:
...
- extern void foo (void *ptr) __atttribute__((nonnull (1)));
+ extern void foo (void *ptr) __attribute__((nonnull (1)));
void foo (void *ptr) {}
...
with the idea in mind to catch:
switch (action)
{
case CATCH_ITER:
- /* No error/quit has occured. */
+ /* No error/quit has occurred. */
return 0;
case CATCH_ITER_1:
catchers.front ().state = CATCHER_RUNNING_1;
/* Convert this object to a std::string, using MAPPING as
enumerator-to-string mapping array. This is not meant to be
called directly. Instead, enum_flags specializations should have
- their own to_string function wrapping this one, thus hidding the
+ their own to_string function wrapping this one, thus hiding the
mapping array from callers.
Note: this is defined outside the template class so it can use
make. It's important to disable comparison with unrelated types to
prevent accidentally comparing with unrelated enum values, which
are convertible to integer, and thus coupled with enum_flags
- convertion to underlying type too, would trigger the built-in 'bool
+ conversion to underlying type too, would trigger the built-in 'bool
operator==(unsigned, int)' operator. */
#define ENUM_FLAGS_GEN_COMP(OPERATOR_OP, OP) \
std::string::size_type start_size = res.size ();
constexpr int chunk_size = 1024;
- /* Resize to accomodate CHUNK_SIZE bytes. */
+ /* Resize to accommodate CHUNK_SIZE bytes. */
res.resize (start_size + chunk_size);
int n = fread (&res[start_size], 1, chunk_size, file.get ());
/* Predicate to gdb_signal_to_host(). Return non-zero if the enum
targ_signal SIGNO has an equivalent ``host'' representation. */
/* FIXME: cagney/1999-11-22: The name below was chosen in preference
- to the shorter gdb_signal_p() because it is far less ambigious.
+ to the shorter gdb_signal_p() because it is far less ambiguous.
In this context ``gdb_signal'' refers to GDB's internal
representation of the target's set of signals while ``host signal''
refers to the target operating system's signal. Confused? */
an enum -- but may not work on all compilers. */
/* Clang targeting Windows does not support attribute gcc_struct, so
- we use the alternative byte array implemention there. */
+ we use the alternative byte array implementation there. */
#if defined _WIN32 && defined __clang__
# define PACKED_USE_ARRAY 1
#else
But the situation is slightly more complex on Windows, due to some
versions of GCC which were reported to generate paths where
- backlashes (the directory separator) were doubled. For instance:
+ backslashes (the directory separator) were doubled. For instance:
c:\\some\\double\\slashes\\dir
... instead of ...
c:\some\double\slashes\dir
using iterator_category = typename IteratorType::iterator_category;
using difference_type = typename IteratorType::difference_type;
- /* Construct a reference_to_pointer_iterator, passing args to the underyling
+ /* Construct a reference_to_pointer_iterator, passing args to the underlying
iterator. */
template <typename... Args>
reference_to_pointer_iterator (Args &&...args)
-/* Support for signoring SIGTTOU.
+/* Support for ignoring SIGTTOU.
Copyright (C) 2003-2023 Free Software Foundation, Inc.
}
/* Convert a OURSIG (an enum gdb_signal) to the form used by the
- target operating system (refered to as the ``host'') or zero if the
+ target operating system (referred to as the ``host'') or zero if the
equivalent host signal is not available. Set/clear OURSIG_OK
accordingly. */