From 3bfdcabbc20d56ce25629b464262928a4f90c042 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 5 Jun 2023 12:53:15 +0200 Subject: [PATCH] [gdb] Fix more typos Fix some more typos: - distinquish -> distinguish - actualy -> actually - singe -> single - frash -> frame - chid -> child - dissassembler -> disassembler - uninitalized -> uninitialized - precontidion -> precondition - regsiters -> registers - marge -> merge - sate -> state - garanteed -> guaranteed - explictly -> explicitly - prefices (nonstandard plural) -> prefixes - bondary -> boundary - formated -> formatted - ithe -> the - arrav -> array - coresponding -> corresponding - owend -> owned - fials -> fails - diasm -> disasm - ture -> true - tpye -> type There's one code change, the name of macro SIG_CODE_BONDARY_FAULT changed to SIG_CODE_BOUNDARY_FAULT. Tested on x86_64-linux. --- gdb/ada-lex.l | 2 +- gdb/amd-dbgapi-target.c | 2 +- gdb/arc-linux-tdep.h | 2 +- gdb/arm-tdep.c | 2 +- gdb/breakpoint.c | 2 +- gdb/cli/cli-decode.c | 4 ++-- gdb/cp-support.c | 2 +- gdb/csky-tdep.c | 2 +- gdb/disasm.h | 2 +- gdb/dwarf2/read.c | 2 +- gdb/frame.c | 2 +- gdb/gdbarch_components.py | 2 +- gdb/i386-linux-tdep.c | 4 ++-- gdb/infrun.c | 2 +- gdb/linux-nat.c | 2 +- gdb/loongarch-tdep.c | 2 +- gdb/nat/linux-osdata.c | 2 +- gdb/ppc-linux-nat.c | 6 +++--- gdb/python/py-disasm.c | 2 +- gdb/regcache.c | 2 +- gdb/testsuite/gdb.perf/single-step.exp | 2 +- gdb/testsuite/lib/gdb.exp | 2 +- gdb/tui/tui-io.c | 2 +- gdb/tui/tui-winsource.h | 2 +- gdb/varobj.c | 2 +- gdb/z80-tdep.c | 2 +- gdbserver/linux-low.cc | 2 +- gdbsupport/array-view.h | 2 +- 28 files changed, 32 insertions(+), 32 deletions(-) diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index f2af21292f4..8c0e7679832 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -371,7 +371,7 @@ canonicalizeNumeral (char *s1, const char *s2) /* Interprets the prefix of NUM that consists of digits of the given BASE as an integer of that BASE, with the string EXP as an exponent. Puts value in yylval, and returns INT, if the string is valid. Causes - an error if the number is improperly formated. BASE, if NULL, defaults + an error if the number is improperly formatted. BASE, if NULL, defaults to "10", and EXP to "1". The EXP does not contain a leading 'e' or 'E'. */ diff --git a/gdb/amd-dbgapi-target.c b/gdb/amd-dbgapi-target.c index f03e82e505e..5565cf907fa 100644 --- a/gdb/amd-dbgapi-target.c +++ b/gdb/amd-dbgapi-target.c @@ -1515,7 +1515,7 @@ amd_dbgapi_target::store_registers (struct regcache *regcache, int regno) amdgpu_gdbarch_tdep *tdep = get_amdgpu_gdbarch_tdep (gdbarch); /* If the register has read-only bits, invalidate the value in the regcache - as the value actualy written may differ. */ + as the value actually written may differ. */ if (tdep->register_properties[regno] & AMD_DBGAPI_REGISTER_PROPERTY_READONLY_BITS) regcache->invalidate (regno); diff --git a/gdb/arc-linux-tdep.h b/gdb/arc-linux-tdep.h index a7f510ab608..f71bdd30c3c 100644 --- a/gdb/arc-linux-tdep.h +++ b/gdb/arc-linux-tdep.h @@ -31,7 +31,7 @@ void arc_linux_supply_gregset (const struct regset *regset, struct regcache *regcache, int regnum, const void *gregs, size_t size); -/* Reads regsiters from the NT_ARC_V2 data array into the regcache. */ +/* Reads registers from the NT_ARC_V2 data array into the regcache. */ void arc_linux_supply_v2_regset (const struct regset *regset, struct regcache *regcache, int regnum, diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c index 40f7e23ec0b..d5128754f02 100644 --- a/gdb/arm-tdep.c +++ b/gdb/arm-tdep.c @@ -3971,7 +3971,7 @@ struct frame_base arm_normal_base = { struct arm_dwarf2_prev_register_cache { - /* Cached value of the coresponding stack pointer for the inner frame. */ + /* Cached value of the corresponding stack pointer for the inner frame. */ CORE_ADDR sp; CORE_ADDR msp; CORE_ADDR msp_s; diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 6cf14ce579c..da6c8de9d14 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -2459,7 +2459,7 @@ build_target_condition_list (struct bp_location *bl) /* No NULL conditions or failed bytecode generation. Build a condition list for this location's address. If we have software and hardware locations at the same address, they aren't - considered duplicates, but we still marge all the conditions + considered duplicates, but we still merge all the conditions anyway, as it's simpler, and doesn't really make a practical difference. */ for (bp_location *loc : loc_range) diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c index b84ce8375fb..0bbe96b5334 100644 --- a/gdb/cli/cli-decode.c +++ b/gdb/cli/cli-decode.c @@ -1779,7 +1779,7 @@ help_cmd (const char *command, struct ui_file *stream) if (alias == nullptr || !user_documented_alias (*alias)) { - /* Case of a normal command, or an alias not explictly + /* Case of a normal command, or an alias not explicitly documented by the user. */ /* If the user asked 'help somecommand' and there is no alias, the false indicates to not output the (single) command name. */ @@ -1789,7 +1789,7 @@ help_cmd (const char *command, struct ui_file *stream) } else { - /* Case of an alias explictly documented by the user. + /* Case of an alias explicitly documented by the user. Only output the alias definition and its explicit documentation. */ fput_alias_definition_styled (*alias, stream); fput_command_names_styled (*alias, false, "\n", stream); diff --git a/gdb/cp-support.c b/gdb/cp-support.c index e804024c08f..2fb9d9ef0b2 100644 --- a/gdb/cp-support.c +++ b/gdb/cp-support.c @@ -2103,7 +2103,7 @@ quote (const char *str) /* Check that removing parameter info out of NAME produces EXPECTED. COMPLETION_MODE indicates whether we're testing normal and completion mode. FILE and LINE are used to provide better test - location information in case ithe check fails. */ + location information in case the check fails. */ static void check_remove_params (const char *file, int line, diff --git a/gdb/csky-tdep.c b/gdb/csky-tdep.c index 694c34a7bde..e82b8dff546 100644 --- a/gdb/csky-tdep.c +++ b/gdb/csky-tdep.c @@ -2581,7 +2581,7 @@ csky_pseudo_register_read (struct gdbarch *gdbarch, int offset = 0; gdb_byte reg_buf[16]; - /* Ensure getting s0~s63 from vrx if tdep->has_vr0 is ture. */ + /* Ensure getting s0~s63 from vrx if tdep->has_vr0 is true. */ if (tdep->has_vr0) { if (regnum < 64) diff --git a/gdb/disasm.h b/gdb/disasm.h index 02d94081077..7e1bb8db4f3 100644 --- a/gdb/disasm.h +++ b/gdb/disasm.h @@ -248,7 +248,7 @@ struct gdb_non_printing_memory_disassembler { /* Nothing. */ } }; -/* A dissassembler class that provides 'print_insn', a method for +/* A disassembler class that provides 'print_insn', a method for disassembling a single instruction to the output stream. */ struct gdb_disassembler : public gdb_printing_disassembler, diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 2f835ddae5e..8c032f689aa 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -14779,7 +14779,7 @@ read_typedef (struct die_info *die, struct dwarf2_cu *cu) /* The long double is defined as a base type in C. GCC creates a long double typedef with target-type _Float128 for the long double to identify it as the IEEE Float128 value. This is a GCC hack since the - DWARF doesn't distinquish between the IBM long double and IEEE + DWARF doesn't distinguish between the IBM long double and IEEE 128-bit float. Replace the GCC workaround for the long double typedef with the actual type information copied from the target-type with the correct long double base type name. */ diff --git a/gdb/frame.c b/gdb/frame.c index 57d53410cc0..f42cf1a37d1 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -2116,7 +2116,7 @@ reinit_frame_cache (void) if (sentinel_frame != nullptr) { /* If frame 0's id is not computed, it is not in the frame stash, so its - dealloc functions will not be called when emptying the frash stash. + dealloc functions will not be called when emptying the frame stash. Call frame_info_del manually in that case. */ frame_info *current_frame = sentinel_frame->prev; if (current_frame != nullptr diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index 07010b13311..ef4a7e61b6c 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -902,7 +902,7 @@ May return 0 when unable to determine that address.""", ) -# The DWARF info currently does not distinquish between IEEE 128-bit floating +# The DWARF info currently does not distinguish between IEEE 128-bit floating # point values and the IBM 128-bit floating point format. GCC has an internal # hack to identify the IEEE 128-bit floating point value. The long double is a # defined base type in C. The GCC hack uses a typedef for long double to diff --git a/gdb/i386-linux-tdep.c b/gdb/i386-linux-tdep.c index a6adeca1b97..554c1455a5f 100644 --- a/gdb/i386-linux-tdep.c +++ b/gdb/i386-linux-tdep.c @@ -386,7 +386,7 @@ i386_canonicalize_syscall (int syscall) /* Value of the sigcode in case of a boundary fault. */ -#define SIG_CODE_BONDARY_FAULT 3 +#define SIG_CODE_BOUNDARY_FAULT 3 /* i386 GNU/Linux implementation of the report_signal_info gdbarch hook. Displays information related to MPX bound @@ -421,7 +421,7 @@ i386_linux_report_signal_info (struct gdbarch *gdbarch, struct ui_out *uiout, } /* If this is not a boundary violation just return. */ - if (sig_code != SIG_CODE_BONDARY_FAULT) + if (sig_code != SIG_CODE_BOUNDARY_FAULT) return; is_upper = (access > upper_bound ? 1 : 0); diff --git a/gdb/infrun.c b/gdb/infrun.c index 4d6df757d23..58da1cef29e 100644 --- a/gdb/infrun.c +++ b/gdb/infrun.c @@ -7500,7 +7500,7 @@ process_event_stop_test (struct execution_control_state *ecs) { /* We are executing the reverse-finish command. If the system supports multiple entry points and we are finishing a - function in reverse. If we are between the entry points singe-step + function in reverse. If we are between the entry points single-step back to the alternate entry point. If we are at the alternate entry point -- just need to back up by one more single-step, which should take us back to the function call. */ diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index fba08973e28..383ef58fa23 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -3968,7 +3968,7 @@ linux_proc_xfer_memory_partial (int pid, gdb_byte *readbuf, return true if so. It wasn't writable before Linux 2.6.39, but there's no way to know whether the feature was backported to older kernels. So we check to see if it works. The result is cached, - and this is garanteed to be called once early during inferior + and this is guaranteed to be called once early during inferior startup, so that any warning is printed out consistently between GDB invocations. Note we don't call it during GDB startup instead though, because then we might warn with e.g. just "gdb --version" diff --git a/gdb/loongarch-tdep.c b/gdb/loongarch-tdep.c index 5739af6cc87..62c6f9b220e 100644 --- a/gdb/loongarch-tdep.c +++ b/gdb/loongarch-tdep.c @@ -653,7 +653,7 @@ loongarch_push_dummy_call (struct gdbarch *gdbarch, all future arguments will also be passed on the stack, i.e., the last argument register may be left unused due to the aligned register pair rule. - long double data tpye is passed in an aligned GAR pair, + long double data type is passed in an aligned GAR pair, the first register in the pair is even-numbered. */ if (gar >= 2) { diff --git a/gdb/nat/linux-osdata.c b/gdb/nat/linux-osdata.c index 55898141f78..d27ddc5de23 100644 --- a/gdb/nat/linux-osdata.c +++ b/gdb/nat/linux-osdata.c @@ -324,7 +324,7 @@ get_core_array_size () /* 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. */ + host. If that fails for some reason, fall back to sysconf. */ gdb::optional count = get_core_array_size_using_sys_possible (); if (count.has_value ()) return *count; diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index ee899a5c049..cb70b58df00 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -333,7 +333,7 @@ public: /* One and only one of these three functions returns true, indicating whether the corresponding interface is the one we detected. The - interface must already have been detected as a precontidion. */ + interface must already have been detected as a precondition. */ bool hwdebug_p () { @@ -2126,7 +2126,7 @@ ppc_linux_nat_target::region_ok_for_hw_watchpoint (CORE_ADDR addr, int len) /* DAWR interface allows to watch up to 512 byte wide ranges. */ region_size = 512; /* DAWR interface allows to watch up to 512 byte wide ranges which - can't cross a 512 byte bondary on machines that doesn't have a + can't cross a 512 byte boundary on machines that doesn't have a second DAWR (P9 or less). */ if (!(hwdebug_info.features & PPC_DEBUG_FEATURE_DATA_BP_ARCH_31)) region_align = 512; @@ -2733,7 +2733,7 @@ ppc_linux_nat_target::low_forget_process (pid_t pid) } /* Copy the per-process state associated with the pid of PARENT to the - sate of CHILD_PID. GDB expects that a forked process will have the + state of CHILD_PID. GDB expects that a forked process will have the same hardware breakpoints and watchpoints as the parent. If we're using the HWDEBUG interface, also copy the thread debug diff --git a/gdb/python/py-disasm.c b/gdb/python/py-disasm.c index 85d936ee4a5..0af089f6b3e 100644 --- a/gdb/python/py-disasm.c +++ b/gdb/python/py-disasm.c @@ -1175,7 +1175,7 @@ struct scoped_disasm_info_object memaddr, info, nullptr); } - /* Upon destruction mark m_diasm_info as invalid. */ + /* Upon destruction mark m_disasm_info as invalid. */ ~scoped_disasm_info_object () { /* Invalidate the original DisassembleInfo object as well as any copies diff --git a/gdb/regcache.c b/gdb/regcache.c index 56292fbd4bf..9b71931bb0b 100644 --- a/gdb/regcache.c +++ b/gdb/regcache.c @@ -376,7 +376,7 @@ get_thread_arch_aspace_regcache (inferior *inf_for_target_calls, regcache *new_regcache = new regcache (inf_for_target_calls, arch, aspace); new_regcache->set_ptid (ptid); /* Work around a problem with g++ 4.8 (PR96537): Call the regcache_up - constructor explictly instead of implicitly. */ + constructor explicitly instead of implicitly. */ ptid_regc_map.insert (std::make_pair (ptid, regcache_up (new_regcache))); return new_regcache; diff --git a/gdb/testsuite/gdb.perf/single-step.exp b/gdb/testsuite/gdb.perf/single-step.exp index 4638c55e68b..a9b76314bdd 100644 --- a/gdb/testsuite/gdb.perf/single-step.exp +++ b/gdb/testsuite/gdb.perf/single-step.exp @@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# This test case is to test the speed of GDB when it is doing singe step. +# This test case is to test the speed of GDB when it is doing single step. # There is one parameter in this test: # - SINGLE_STEP_COUNT is the number of single step GDB performs. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 62e0b0b3db5..220640210cd 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -174,7 +174,7 @@ verbose "using GDB = $GDB" 2 # The data directory the testing GDB will use. By default, assume # we're testing a non-installed GDB in the build directory. Users may -# also explictly override the -data-directory from the command line. +# also explicitly override the -data-directory from the command line. if ![info exists GDB_DATA_DIRECTORY] { set GDB_DATA_DIRECTORY [file normalize "[pwd]/../data-directory"] } diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index a1eadcd937d..908cb834e4c 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -1191,7 +1191,7 @@ tui_getc_1 (FILE *fp) #endif } - /* Keycodes above KEY_MAX are not garanteed to be stable. + /* Keycodes above KEY_MAX are not guaranteed to be stable. Compare keyname instead. */ if (ch >= KEY_MAX) { diff --git a/gdb/tui/tui-winsource.h b/gdb/tui/tui-winsource.h index a8ff94f5769..4a355121906 100644 --- a/gdb/tui/tui-winsource.h +++ b/gdb/tui/tui-winsource.h @@ -316,7 +316,7 @@ private: struct tui_source_windows { - /* Work around Wmaybe-uninitalized warning with g++ 11.0.0, see also + /* Work around Wmaybe-uninitialized warning with g++ 11.0.0, see also PR gcc/96295. Note that "tui_source_windows () = default" doesn't work around the warning. */ tui_source_windows () {} diff --git a/gdb/varobj.c b/gdb/varobj.c index f37618a6e17..81b8e61f304 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -2414,7 +2414,7 @@ varobj_invalidate_if_uses_objfile (struct objfile *objfile) /* var->value->type and var->type might also reference the objfile. This is taken care of in value.c:preserve_values which deals with - making sure that objfile-owend types are replaced with + making sure that objfile-owned types are replaced with gdbarch-owned equivalents. */ }); } diff --git a/gdb/z80-tdep.c b/gdb/z80-tdep.c index 9ac37329c88..d9ba2079836 100644 --- a/gdb/z80-tdep.c +++ b/gdb/z80-tdep.c @@ -1403,7 +1403,7 @@ z80_get_insn_info (struct gdbarch *gdbarch, const gdb_byte *buf, int *size) info = &ez80_adl_main_insn_table[4]; /* skip force_nops */ break; default: - info = &ez80_main_insn_table[8]; /* skip eZ80 prefices and force_nops */ + info = &ez80_main_insn_table[8]; /* skip eZ80 prefixes and force_nops */ break; } do diff --git a/gdbserver/linux-low.cc b/gdbserver/linux-low.cc index e6a39202a98..8ab16698632 100644 --- a/gdbserver/linux-low.cc +++ b/gdbserver/linux-low.cc @@ -3540,7 +3540,7 @@ linux_process_target::wait_1 (ptid_t ptid, target_waitstatus *ourstatus, else { /* The LWP stopped due to a plain signal or a syscall signal. Either way, - event_chid->waitstatus wasn't filled in with the details, so look at + event_child->waitstatus wasn't filled in with the details, so look at the wait status W. */ if (WSTOPSIG (w) == SYSCALL_SIGTRAP) { diff --git a/gdbsupport/array-view.h b/gdbsupport/array-view.h index d07c8bc53fc..ee3a3c58710 100644 --- a/gdbsupport/array-view.h +++ b/gdbsupport/array-view.h @@ -279,7 +279,7 @@ operator!= (const gdb::array_view &lhs, const gdb::array_view &rhs) foo (1, 2, gdb::array_view(values, nargs)); Or, better, using make_array_view, which has the advantage of - inferring the arrav_view element's type: + inferring the array_view element's type: foo (1, 2, gdb::make_array_view (values, nargs)); */ -- 2.30.2