From f4afd6cb1b72760d1c8af4bc82c74c289aa1ecf7 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 5 Jun 2023 12:53:15 +0200 Subject: [PATCH] [gdb] Fix grammar in comments and docs Fix grammar in some comments and docs: - machines that doesn't -> machines that don't - its a -> it's a - its the -> it's the - if does its not -> if it does it's not - one more instructions if doesn't match -> one more instruction if it doesn't match - it's own -> its own - it's first -> its first - it's pointer -> its pointer I also came across "it's performance" in gdb/stubs/*-stub.c in the HP public domain notice, I've left that alone. Tested on x86_64-linux. --- gdb/amd64-tdep.c | 2 +- gdb/doc/stabs.texinfo | 2 +- gdb/gdbarch-gen.h | 2 +- gdb/gdbarch_components.py | 2 +- gdb/i386-tdep.c | 2 +- gdb/or1k-tdep.c | 2 +- gdb/ppc-linux-nat.c | 2 +- gdb/ppc64-tdep.c | 2 +- gdb/solib-dsbt.c | 2 +- gdb/solib-svr4.c | 2 +- gdb/stubs/i386-stub.c | 2 +- gdb/stubs/m32r-stub.c | 2 +- gdb/stubs/m68k-stub.c | 2 +- gdb/testsuite/gdb.base/coremaker.c | 2 +- gdb/testsuite/gdb.mi/mi-exec-run.exp | 2 +- gdb/testsuite/lib/mi-support.exp | 2 +- 16 files changed, 16 insertions(+), 16 deletions(-) diff --git a/gdb/amd64-tdep.c b/gdb/amd64-tdep.c index 2b027575a0d..2c4189203cb 100644 --- a/gdb/amd64-tdep.c +++ b/gdb/amd64-tdep.c @@ -1750,7 +1750,7 @@ amd64_displaced_step_fixup (struct gdbarch *gdbarch, system calls. */ if (amd64_syscall_p (insn_details, &insn_len) /* GDB can get control back after the insn after the syscall. - Presumably this is a kernel bug. Fixup ensures its a nop, we + Presumably this is a kernel bug. Fixup ensures it's a nop, we add one to the length for it. */ && (pc < to || pc > (to + insn_len + 1))) displaced_debug_printf ("syscall changed %%rip; not relocating"); diff --git a/gdb/doc/stabs.texinfo b/gdb/doc/stabs.texinfo index e2ca6f61dbe..a9f48ef9318 100644 --- a/gdb/doc/stabs.texinfo +++ b/gdb/doc/stabs.texinfo @@ -3971,7 +3971,7 @@ symbols of file scope. This is true for default, @samp{-ansi} and @item What ends the procedure scope? Is it the proc block's @code{N_RBRAC} or the -next @code{N_FUN}? (I believe its the first.) +next @code{N_FUN}? (I believe it's the first.) @end itemize @node Stab Sections diff --git a/gdb/gdbarch-gen.h b/gdb/gdbarch-gen.h index 7f83bf4e214..101b1b73636 100644 --- a/gdb/gdbarch-gen.h +++ b/gdb/gdbarch-gen.h @@ -574,7 +574,7 @@ extern void set_gdbarch_memory_remove_breakpoint (struct gdbarch *gdbarch, gdbar extern CORE_ADDR gdbarch_decr_pc_after_break (struct gdbarch *gdbarch); extern void set_gdbarch_decr_pc_after_break (struct gdbarch *gdbarch, CORE_ADDR decr_pc_after_break); -/* A function can be addressed by either it's "pointer" (possibly a +/* A function can be addressed by either its "pointer" (possibly a descriptor address) or "entry point" (first executable instruction). The method "convert_from_func_ptr_addr" converting the former to the latter. gdbarch_deprecated_function_start_offset is being used to implement diff --git a/gdb/gdbarch_components.py b/gdb/gdbarch_components.py index ef4a7e61b6c..23e5789327c 100644 --- a/gdb/gdbarch_components.py +++ b/gdb/gdbarch_components.py @@ -1072,7 +1072,7 @@ Value( Value( comment=""" -A function can be addressed by either it's "pointer" (possibly a +A function can be addressed by either its "pointer" (possibly a descriptor address) or "entry point" (first executable instruction). The method "convert_from_func_ptr_addr" converting the former to the latter. gdbarch_deprecated_function_start_offset is being used to implement diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 6a14d0dcfe8..a97e11647b9 100644 --- a/gdb/i386-tdep.c +++ b/gdb/i386-tdep.c @@ -913,7 +913,7 @@ i386_displaced_step_fixup (struct gdbarch *gdbarch, && pc != to + (insn - insn_start) + insn_len /* GDB can get control back after the insn after the syscall. Presumably this is a kernel bug. - i386_displaced_step_copy_insn ensures its a nop, + i386_displaced_step_copy_insn ensures it's a nop, we add one to the length for it. */ && pc != to + (insn - insn_start) + insn_len + 1) displaced_debug_printf ("syscall changed %%eip; not relocating"); diff --git a/gdb/or1k-tdep.c b/gdb/or1k-tdep.c index 5cef1fa279c..a472a766959 100644 --- a/gdb/or1k-tdep.c +++ b/gdb/or1k-tdep.c @@ -360,7 +360,7 @@ or1k_delay_slot_p (struct gdbarch *gdbarch, CORE_ADDR pc) NULL, 32, &tmp_fields, 0); /* NULL here would mean the last instruction was not understood by cgen. - This should not usually happen, but if does its not a delay slot. */ + This should not usually happen, but if it does it's not a delay slot. */ if (insn == NULL) return 0; diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c index cb70b58df00..55dcda9f525 100644 --- a/gdb/ppc-linux-nat.c +++ b/gdb/ppc-linux-nat.c @@ -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 boundary on machines that doesn't have a + can't cross a 512 byte boundary on machines that don't have a second DAWR (P9 or less). */ if (!(hwdebug_info.features & PPC_DEBUG_FEATURE_DATA_BP_ARCH_31)) region_align = 512; diff --git a/gdb/ppc64-tdep.c b/gdb/ppc64-tdep.c index 4408a12c44b..fb12c057df8 100644 --- a/gdb/ppc64-tdep.c +++ b/gdb/ppc64-tdep.c @@ -688,7 +688,7 @@ ppc64_skip_trampoline_code_1 (frame_info_ptr frame, CORE_ADDR pc) pc = ppc64_standard_linkage1_target (frame, insns); else { - /* Scan backward one more instructions if doesn't match. */ + /* Scan backward one more instruction if it doesn't match. */ pc -= 4; continue; } diff --git a/gdb/solib-dsbt.c b/gdb/solib-dsbt.c index 6dcb8d22b56..b18c4a3e82a 100644 --- a/gdb/solib-dsbt.c +++ b/gdb/solib-dsbt.c @@ -853,7 +853,7 @@ dsbt_relocate_main_executable (void) } /* When gdb starts up the inferior, it nurses it along (through the - shell) until it is ready to execute it's first instruction. At this + shell) until it is ready to execute its first instruction. At this point, this function gets called via solib_create_inferior_hook. For the DSBT shared library, the main executable needs to be relocated. diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c index df6a695f646..0ef83726d62 100644 --- a/gdb/solib-svr4.c +++ b/gdb/solib-svr4.c @@ -2312,7 +2312,7 @@ svr4_create_solib_event_breakpoints (svr4_info *info, struct gdbarch *gdbarch, set to 1. When the dynamic linker sees this flag set, it will set a breakpoint at a location known only to itself, after saving the original contents of that place and the breakpoint address itself, - in it's own internal structures. When we resume the inferior, it + in its own internal structures. When we resume the inferior, it will eventually take a SIGTRAP when it runs into the breakpoint. We handle this (in a different place) by restoring the contents of the breakpointed location (which is only known after it stops), diff --git a/gdb/stubs/i386-stub.c b/gdb/stubs/i386-stub.c index 04996b75cf6..74fe4767c83 100644 --- a/gdb/stubs/i386-stub.c +++ b/gdb/stubs/i386-stub.c @@ -46,7 +46,7 @@ * * Because gdb will sometimes write to the stack area to execute function * calls, this program cannot rely on using the supervisor stack so it - * uses it's own stack area reserved in the int array remcomStack. + * uses its own stack area reserved in the int array remcomStack. * ************* * diff --git a/gdb/stubs/m32r-stub.c b/gdb/stubs/m32r-stub.c index 7f0614a8dbd..90754e31364 100644 --- a/gdb/stubs/m32r-stub.c +++ b/gdb/stubs/m32r-stub.c @@ -46,7 +46,7 @@ * * Because gdb will sometimes write to the stack area to execute function * calls, this program cannot rely on using the supervisor stack so it - * uses it's own stack area reserved in the int array remcomStack. + * uses its own stack area reserved in the int array remcomStack. * ************* * diff --git a/gdb/stubs/m68k-stub.c b/gdb/stubs/m68k-stub.c index 47eca001d12..15984229491 100644 --- a/gdb/stubs/m68k-stub.c +++ b/gdb/stubs/m68k-stub.c @@ -62,7 +62,7 @@ * * Because gdb will sometimes write to the stack area to execute function * calls, this program cannot rely on using the supervisor stack so it - * uses it's own stack area reserved in the int array remcomStack. + * uses its own stack area reserved in the int array remcomStack. * ************* * diff --git a/gdb/testsuite/gdb.base/coremaker.c b/gdb/testsuite/gdb.base/coremaker.c index 9c821ce6658..cbe9719e8db 100644 --- a/gdb/testsuite/gdb.base/coremaker.c +++ b/gdb/testsuite/gdb.base/coremaker.c @@ -45,7 +45,7 @@ int coremaker_data = 1; /* In Data section */ int coremaker_bss; /* In BSS section */ /* Place a chunk of memory before coremaker_ro to improve the chances - that coremaker_ro will end up on it's own page. See: + that coremaker_ro will end up on its own page. See: https://sourceware.org/pipermail/gdb-patches/2020-May/168168.html https://sourceware.org/pipermail/gdb-patches/2020-May/168170.html */ diff --git a/gdb/testsuite/gdb.mi/mi-exec-run.exp b/gdb/testsuite/gdb.mi/mi-exec-run.exp index 722634a472b..f47e2eefe46 100644 --- a/gdb/testsuite/gdb.mi/mi-exec-run.exp +++ b/gdb/testsuite/gdb.mi/mi-exec-run.exp @@ -62,7 +62,7 @@ proc test {inftty_mode mi_mode force_fail} { } if {$force_fail} { - # Disable the shell so that its the first exec that fails, + # Disable the shell so that it's the first exec that fails, # instead of the shell starting and then failing with some # unspecified output. mi_gdb_test "-gdb-set startup-with-shell off" ".*" diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index 2ff4ab93ea8..49d5e2ef272 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -201,7 +201,7 @@ proc mi_gdb_start_separate_mi_tty { { flags {} } } { # FLAGS is a list of flags, each flag is a string. # # If "separate-inferior-tty" is specified, the inferior works with -# it's own PTY. +# its own PTY. # # If "separate-mi-tty" is specified, the gdb starts in CLI mode, with # MI running on a secondary UI, on its own tty. -- 2.30.2