mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-11-16 04:24:43 +00:00
gdb, gdbserver, gdbsupport: trim trailing whitespaces
I noticed my IDE (VSCode) starting to automatically trim trailing
whitespaces on save, despite the setting for it being disabled. I
realized that this is because the .editorconfig file now has
trim_trailing_whitespace = true
for many file types. If we have this EditorConfig setting forcing
editors to trim trailing whitespaces, I think it would make sense to
clean up trailing whitespaces from our files. Otherwise, people will
always get spurious whitespace changes when editing these files.
I did a mass cleanup using this command:
$ find gdb gdbserver gdbsupport -type f \( \
-name "*.c" -o \
-name "*.h" -o \
-name "*.cc" -o \
-name "*.texi" -o \
-name "*.exp" -o \
-name "*.tcl" -o \
-name "*.py" -o \
-name "*.s" -o \
-name "*.S" -o \
-name "*.asm" -o \
-name "*.awk" -o \
-name "*.ac" -o \
-name "Makefile*" -o \
-name "*.sh" -o \
-name "*.adb" -o \
-name "*.ads" -o \
-name "*.d" -o \
-name "*.go" -o \
-name "*.F90" -o \
-name "*.f90" \
\) -exec sed -ri 's/[ \t]+$//' {} +
I then did an autotools regen, because we don't actually want to change
the Makefile and Makefile.in files that are generated.
Change-Id: I6f91b83e3b8c4dc7d5d51a2ebf60706120efe691
This commit is contained in:
committed by
Simon Marchi
parent
de49e8229b
commit
a5cbe67512
@@ -87,7 +87,7 @@ struct thread_info : public intrusive_list_node<thread_info>
|
||||
|
||||
/* Thread options GDB requested with QThreadOptions. */
|
||||
gdb_thread_options thread_options = 0;
|
||||
|
||||
|
||||
private:
|
||||
process_info *m_process;
|
||||
std::unique_ptr<struct regcache> m_regcache = nullptr;
|
||||
|
||||
@@ -336,7 +336,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
|
||||
{
|
||||
int xmm0_regnum = find_regno (regcache->tdesc, "xmm0");
|
||||
|
||||
for (i = 0; i < num_xmm_registers; i++)
|
||||
for (i = 0; i < num_xmm_registers; i++)
|
||||
{
|
||||
collect_register (regcache, i + xmm0_regnum, raw);
|
||||
p = fp->xmm_space + i * 16;
|
||||
@@ -353,7 +353,7 @@ i387_cache_to_xsave (struct regcache *regcache, void *buf)
|
||||
{
|
||||
int ymm0h_regnum = find_regno (regcache->tdesc, "ymm0h");
|
||||
|
||||
for (i = 0; i < num_xmm_registers; i++)
|
||||
for (i = 0; i < num_xmm_registers; i++)
|
||||
{
|
||||
collect_register (regcache, i + ymm0h_regnum, raw);
|
||||
p = fp->ymmh_space () + i * 16;
|
||||
|
||||
@@ -131,7 +131,7 @@ initialize_fast_tracepoint_trampoline_buffer (void)
|
||||
FILE *f = fopen ("/proc/sys/vm/mmap_min_addr", "r");
|
||||
|
||||
if (!f)
|
||||
{
|
||||
{
|
||||
snprintf (buf, sizeof (buf), "mmap_min_addr open failed: %s",
|
||||
safe_strerror (errno));
|
||||
set_trampoline_buffer_space (0, 0, buf);
|
||||
@@ -140,9 +140,9 @@ initialize_fast_tracepoint_trampoline_buffer (void)
|
||||
|
||||
if (fgets (buf, IPA_BUFSIZ, f))
|
||||
sscanf (buf, "%llu", &mmap_min_addr);
|
||||
|
||||
|
||||
fclose (f);
|
||||
|
||||
|
||||
buffer_size = buffer_end - mmap_min_addr;
|
||||
|
||||
if (buffer_size >= min_buffer_size)
|
||||
|
||||
@@ -562,7 +562,7 @@ private:
|
||||
process_info *add_linux_process_no_mem_file (int pid, int attached);
|
||||
|
||||
/* Free resources associated to PROC and remove it. */
|
||||
void remove_linux_process (process_info *proc);
|
||||
void remove_linux_process (process_info *proc);
|
||||
|
||||
/* Add a new thread. */
|
||||
lwp_info *add_lwp (ptid_t ptid);
|
||||
|
||||
@@ -211,7 +211,7 @@ struct arch_process_info
|
||||
/* Mapping between the general-purpose registers in `struct user'
|
||||
format and GDB's register array layout.
|
||||
Note that the transfer layout uses 64-bit regs. */
|
||||
static /*const*/ int i386_regmap[] =
|
||||
static /*const*/ int i386_regmap[] =
|
||||
{
|
||||
RAX * 8, RCX * 8, RDX * 8, RBX * 8,
|
||||
RSP * 8, RBP * 8, RSI * 8, RDI * 8,
|
||||
@@ -264,7 +264,7 @@ static const int x86_64_regmap[] =
|
||||
|
||||
/* Mapping between the general-purpose registers in `struct user'
|
||||
format and GDB's register array layout. */
|
||||
static /*const*/ int i386_regmap[] =
|
||||
static /*const*/ int i386_regmap[] =
|
||||
{
|
||||
EAX * 4, ECX * 4, EDX * 4, EBX * 4,
|
||||
UESP * 4, EBP * 4, ESI * 4, EDI * 4,
|
||||
|
||||
@@ -130,7 +130,7 @@ extern unsigned long signal_pid;
|
||||
struct client_state
|
||||
{
|
||||
client_state ():
|
||||
own_buf ((char *) xmalloc (PBUFSIZ + 1))
|
||||
own_buf ((char *) xmalloc (PBUFSIZ + 1))
|
||||
{}
|
||||
|
||||
/* The thread set with an `Hc' packet. `Hc' is deprecated in favor of
|
||||
|
||||
@@ -2850,7 +2850,7 @@ have_fast_tracepoint_trampoline_buffer (char *buf)
|
||||
{
|
||||
internal_error ("error extracting trampoline_buffer_end");
|
||||
}
|
||||
|
||||
|
||||
if (buf)
|
||||
{
|
||||
buf[0] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user