+2021-05-27 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Fix tab after space indentation issues throughout.
+
2021-05-27 Simon Marchi <simon.marchi@polymtl.ca>
* Fix some indentation mistakes throughout.
&& ada_is_modular_type (value_type (arr)))
{
/* This is a (right-justified) modular type representing a packed
- array with no wrapper. In order to interpret the value through
- the (left-justified) packed array type we just built, we must
- first left-justify it. */
+ array with no wrapper. In order to interpret the value through
+ the (left-justified) packed array type we just built, we must
+ first left-justify it. */
int bit_size, bit_pos;
ULONGEST mod;
if (!ptrace64aix (PTT_READ_SPRS, tid,
(unsigned long) &sprs64, 0, NULL))
memset (&sprs64, 0, sizeof (sprs64));
- memcpy (&context->msr, &sprs64, sizeof(sprs64));
+ memcpy (&context->msr, &sprs64, sizeof(sprs64));
}
else
{
if (!ptrace32 (PTT_READ_SPRS, tid, (uintptr_t) &sprs32, 0, NULL))
memset (&sprs32, 0, sizeof (sprs32));
- memcpy (&context->msr, &sprs32, sizeof(sprs32));
+ memcpy (&context->msr, &sprs32, sizeof(sprs32));
}
}
return 0;
"andq $-XXX, %rsp" can be either 4 bytes or 7 bytes:
- 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
- 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
+ 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
+ 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
*/
gdb_byte buf[18];
"andq $-XXX, %rsp" can be either 4 bytes or 7 bytes:
- 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
- 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
+ 0x48 0x83 0xe4 0xf0 andq $-16, %rsp
+ 0x48 0x81 0xe4 0x00 0xff 0xff 0xff andq $-256, %rsp
"andl $-XXX, %esp" can be either 3 bytes or 6 bytes:
- 0x83 0xe4 0xf0 andl $-16, %esp
- 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
+ 0x83 0xe4 0xf0 andl $-16, %esp
+ 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
*/
gdb_byte buf[19];
_initialize_amd64_tdep ()
{
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x86_64, GDB_OSABI_NONE,
- amd64_none_init_abi);
+ amd64_none_init_abi);
gdbarch_register_osabi (bfd_arch_i386, bfd_mach_x64_32, GDB_OSABI_NONE,
- amd64_x32_none_init_abi);
+ amd64_x32_none_init_abi);
}
\f
gdb_byte buf[4];
if (target_read_memory (pc + 1, buf, sizeof buf) == 0)
- {
- struct bound_minimal_symbol s;
- CORE_ADDR call_dest;
+ {
+ struct bound_minimal_symbol s;
+ CORE_ADDR call_dest;
call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
- s = lookup_minimal_symbol_by_pc (call_dest);
- if (s.minsym != NULL
- && s.minsym->linkage_name () != NULL
- && strcmp (s.minsym->linkage_name (), "__main") == 0)
- pc += 5;
- }
+ s = lookup_minimal_symbol_by_pc (call_dest);
+ if (s.minsym != NULL
+ && s.minsym->linkage_name () != NULL
+ && strcmp (s.minsym->linkage_name (), "__main") == 0)
+ pc += 5;
+ }
}
return pc;
case BX_WRITE_PC:
bx_write_pc (regs, val);
- break;
+ break;
case LOAD_WRITE_PC:
load_write_pc (regs, dsc, val);
- break;
+ break;
case ALU_WRITE_PC:
alu_write_pc (regs, dsc, val);
- break;
+ break;
case CANNOT_WRITE_PC:
warning (_("Instruction wrote to PC in an unexpected way when "
target. */
for (bp_location *loc : all_bp_locations ())
mark_breakpoint_location_modified (loc);
- }
+ }
else
{
/* Manually mark non-duplicate locations to synch conditions
gdbarch *caller_arch = frame_unwind_caller_arch (wp_frame);
CORE_ADDR caller_pc = frame_unwind_caller_pc (wp_frame);
- scope_breakpoint
+ scope_breakpoint
= create_internal_breakpoint (caller_arch, caller_pc,
bp_watchpoint_scope,
&momentary_breakpoint_ops);
symbol lookup which returned no match. */
break;
}
- else if (cs->c_secnum == N_ABS)
- {
- /* Use the correct minimal symbol type (and don't
- relocate) for absolute values. */
- ms_type = mst_abs;
- sec = cs_to_section (cs, objfile);
- tmpaddr = cs->c_value;
- }
+ else if (cs->c_secnum == N_ABS)
+ {
+ /* Use the correct minimal symbol type (and don't
+ relocate) for absolute values. */
+ ms_type = mst_abs;
+ sec = cs_to_section (cs, objfile);
+ tmpaddr = cs->c_value;
+ }
else
{
asection *bfd_section = cs_to_bfd_section (cs, objfile);
sec = cs_to_section (cs, objfile);
tmpaddr = cs->c_value;
- /* Statics in a PE file also get relocated. */
- if (cs->c_sclass == C_EXT
- || cs->c_sclass == C_THUMBEXTFUNC
- || cs->c_sclass == C_THUMBEXT
- || (pe_file && (cs->c_sclass == C_STAT)))
+ /* Statics in a PE file also get relocated. */
+ if (cs->c_sclass == C_EXT
+ || cs->c_sclass == C_THUMBEXTFUNC
+ || cs->c_sclass == C_THUMBEXT
+ || (pe_file && (cs->c_sclass == C_STAT)))
offset = objfile->section_offsets[sec];
if (bfd_section->flags & SEC_CODE)
if (!p)
continue; /* Not a debugging symbol. */
- sym_len = 0;
+ sym_len = 0;
sym_name = NULL; /* pacify "gcc -Werror" */
- if (psymtab_language == language_cplus)
- {
+ if (psymtab_language == language_cplus)
+ {
std::string name (namestring, p - namestring);
gdb::unique_xmalloc_ptr<char> new_name
= cp_canonicalize_string (name.c_str ());
}
}
- if (sym_len == 0)
- {
- sym_name = namestring;
- sym_len = p - namestring;
- }
+ if (sym_len == 0)
+ {
+ sym_name = namestring;
+ sym_len = p - namestring;
+ }
/* Main processing section for debugging symbols which
the initial read through the symbol tables needs to worry
struct block *block;
if (outermost_context_p ())
- {
+ {
lbrac_mismatch_complaint (symnum);
- break;
- }
+ break;
+ }
/* The following check is added before recording line 0 at
end of function so as to handle hand-generated stabs
const char *suffix)
{
filename = (std::string (dir) + SLASH_STRING + basename
- + suffix);
+ + suffix);
filename_temp = make_temp_filename (filename);
else if (tramp_type == RT_SIGTRAMP)
{
/* For a realtime sigtramp frame, SP + 12 contains a pointer
- to a ucontext struct. The ucontext struct contains a
- sigcontext struct starting 24 bytes in. (The offset of
- uc_mcontext within struct ucontext is derived as follows:
- stack_t is a 12-byte struct and struct sigcontext is
- 8-byte aligned. This gives an offset of 8 + 12 + 4 (for
- padding) = 24.) */
+ to a ucontext struct. The ucontext struct contains a
+ sigcontext struct starting 24 bytes in. (The offset of
+ uc_mcontext within struct ucontext is derived as follows:
+ stack_t is a 12-byte struct and struct sigcontext is
+ 8-byte aligned. This gives an offset of 8 + 12 + 4 (for
+ padding) = 24.) */
if (target_read_memory (sp + 12, buf, sizeof buf) != 0)
{
warning (_("Can't read realtime sigtramp frame."));
return 0;
}
sc_addr = extract_unsigned_integer (buf, sizeof buf, byte_order);
- sc_addr += 24;
+ sc_addr += 24;
}
else
internal_error (__FILE__, __LINE__, _("not a signal trampoline"));
void inf_validate_task_sc (struct inf *inf);
void inf_restore_exc_ports (struct inf *inf);
void inf_set_threads_resume_sc (struct inf *inf,
- struct proc *run_thread,
- int run_others);
+ struct proc *run_thread,
+ int run_others);
int inf_set_threads_resume_sc_for_signal_thread (struct inf *inf);
void inf_resume (struct inf *inf);
void inf_set_step_thread (struct inf *inf, struct proc *proc);
if (get_frame_pc (this_frame) >= prologue_end
&& (u->Save_SP || u->alloca_frame) && fp != 0)
{
- cache->base = fp;
+ cache->base = fp;
- if (hppa_debug)
+ if (hppa_debug)
fprintf_unfiltered (gdb_stdlog, " (base=%s) [frame pointer]",
paddress (gdbarch, cache->base));
}
if (in_plt_section (pc))
{
/* Sanity check: are we pointing to the PLT stub? */
- if (!hppa_match_insns (gdbarch, pc, hppa_plt_stub, insn))
+ if (!hppa_match_insns (gdbarch, pc, hppa_plt_stub, insn))
{
warning (_("Cannot resolve PLT stub at %s."),
paddress (gdbarch, pc));
ULONGEST eflags;
/* Workaround for a bug in FreeBSD. Make sure that the trace
- flag is off when doing a continue. There is a code path
- through the kernel which leaves the flag set when it should
- have been cleared. If a process has a signal pending (such
- as SIGALRM) and we do a PT_STEP, the process never really has
- a chance to run because the kernel needs to notify the
- debugger that a signal is being sent. Therefore, the process
- never goes through the kernel's trap() function which would
- normally clear it. */
+ flag is off when doing a continue. There is a code path
+ through the kernel which leaves the flag set when it should
+ have been cleared. If a process has a signal pending (such
+ as SIGALRM) and we do a PT_STEP, the process never really has
+ a chance to run because the kernel needs to notify the
+ debugger that a signal is being sent. Therefore, the process
+ never goes through the kernel's trap() function which would
+ normally clear it. */
regcache_cooked_read_unsigned (regcache, I386_EFLAGS_REGNUM,
&eflags);
extern const struct target_desc *i386_linux_read_description (uint64_t xcr0);
/* Format of XSAVE extended state is:
- struct
+ struct
{
fxsave_bytes[0..463]
sw_usable_bytes[464..511]
"andl $-XXX, %esp" can be either 3 bytes or 6 bytes:
- 0x83 0xe4 0xf0 andl $-16, %esp
- 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
+ 0x83 0xe4 0xf0 andl $-16, %esp
+ 0x81 0xe4 0x00 0xff 0xff 0xff andl $-256, %esp
*/
gdb_byte buf[14];
gdb_byte buf[4];
if (target_read_code (pc + 1, buf, sizeof buf) == 0)
- {
+ {
/* Make sure address is computed correctly as a 32bit
integer even if CORE_ADDR is 64 bit wide. */
- struct bound_minimal_symbol s;
- CORE_ADDR call_dest;
+ struct bound_minimal_symbol s;
+ CORE_ADDR call_dest;
call_dest = pc + 5 + extract_signed_integer (buf, 4, byte_order);
call_dest = call_dest & 0xffffffffU;
- s = lookup_minimal_symbol_by_pc (call_dest);
- if (s.minsym != NULL
- && s.minsym->linkage_name () != NULL
- && strcmp (s.minsym->linkage_name (), "__main") == 0)
- pc += 5;
- }
+ s = lookup_minimal_symbol_by_pc (call_dest);
+ if (s.minsym != NULL
+ && s.minsym->linkage_name () != NULL
+ && strcmp (s.minsym->linkage_name (), "__main") == 0)
+ pc += 5;
+ }
}
return pc;
calls are made async, this will likely be made the norm. */
switch (gdbarch_return_value (gdbarch, function, value_type,
- NULL, NULL, NULL))
+ NULL, NULL, NULL))
{
case RETURN_VALUE_REGISTER_CONVENTION:
case RETURN_VALUE_ABI_RETURNS_ADDRESS:
bool refresh_step_info = true;
if ((ecs->event_thread->suspend.stop_pc == stop_pc_sal.pc)
&& (ecs->event_thread->current_line != stop_pc_sal.line
- || ecs->event_thread->current_symtab != stop_pc_sal.symtab))
+ || ecs->event_thread->current_symtab != stop_pc_sal.symtab))
{
/* We are at a different line. */
symbol files loaded, then get_current_or_default would raise an
error. But `set width' shouldn't raise an error just because
it can't decide which scope to macro-expand its argument in. */
- struct symtab_and_line cursal =
- get_current_source_symtab_and_line ();
+ struct symtab_and_line cursal
+ = get_current_source_symtab_and_line ();
sal.symtab = cursal.symtab;
sal.line = cursal.line;
}
gdb_disassembly (gdbarch, uiout,
- disasm_flags,
+ disasm_flags,
how_many, low, high);
}
break;
case VAROBJ_INVALID:
uiout->field_string ("in_scope", "invalid");
- break;
+ break;
}
if (r.status != VAROBJ_INVALID)
jb_addr = get_frame_register_unsigned (frame, MIPS_A0_REGNUM);
if (target_read_memory (jb_addr + NBSD_MIPS_JB_OFFSET (gdbarch), buf,
- NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch)))
+ NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch)))
return 0;
*pc = extract_unsigned_integer (buf, NBSD_MIPS_JB_ELEMENT_SIZE (gdbarch),
/* On MIPS16, any one of the following is likely to be the
start of a function:
- extend save
+ extend save
save
entry
addiu sp,-n
#define mnsh_send_open(helper, filename, flags, mode) \
mnsh_send_message (helper->sock, MNSH_REQ_OPEN, -1, flags, mode, \
- filename, strlen (filename) + 1)
+ filename, strlen (filename) + 1)
#define mnsh_send_unlink(helper, filename) \
mnsh_send_message (helper->sock, MNSH_REQ_UNLINK, -1, 0, 0, \
- filename, strlen (filename) + 1)
+ filename, strlen (filename) + 1)
#define mnsh_send_readlink(helper, filename) \
mnsh_send_message (helper->sock, MNSH_REQ_READLINK, -1, 0, 0, \
- filename, strlen (filename) + 1)
+ filename, strlen (filename) + 1)
/* Receive a message from the helper. Issue an assertion failure if
the message isn't a correctly-formatted MNSH_RET_INT. Set RESULT
return (DR_LEN_4 | rw);
case 8:
if (TARGET_HAS_DR_LEN_8)
- return (DR_LEN_8 | rw);
+ return (DR_LEN_8 | rw);
/* FALL THROUGH */
default:
internal_error (__FILE__, __LINE__, _("\
/* ORHI rb, ra, uimm (also used for MOVHI) */
if (rb != 0)
{
- value[rb].reg = (value[ra].reg == 0) ? 0 : -1;
+ value[rb].reg = (value[ra].reg == 0) ? 0 : -1;
value[rb].offset = value[ra].offset | (uimm << 16);
}
}
the string "a b c d", and as output it would fill in argv with
the four arguments "a", "b", "c", "d". The only additional
functionality is simple quoting. The gdb command:
- run a "b c d" f
+ run a "b c d" f
will fill in argv with the three args "a", "b c d", "e". */
static void
breakup_args (char *scratch, char **argv)
*string_pos = TYPE_FIELD_BITPOS (type, 1) / TARGET_CHAR_BIT;
if (char_type)
*char_type = TYPE_TARGET_TYPE (type->field (1).type ());
- if (arrayname)
+ if (arrayname)
*arrayname = TYPE_FIELD_NAME (type, 1);
return 2;
};
if ((*char_type)->code () == TYPE_CODE_ARRAY)
*char_type = TYPE_TARGET_TYPE (*char_type);
}
- if (arrayname)
+ if (arrayname)
*arrayname = TYPE_FIELD_NAME (type, 2);
return 3;
};
&& type->code () == TYPE_CODE_FLT)
{
/* Floats and doubles go in f1 .. f13. 32-bit floats are converted
- to double first. */
+ to double first. */
if (argpos->regcache && argpos->freg <= 13)
{
int regnum = tdep->ppc_fp0_regnum + argpos->freg;
opts.format = 0;
if (type->is_unsigned ())
type = builtin_type (gdbarch)->builtin_true_unsigned_char;
- else
+ else
type = builtin_type (gdbarch)->builtin_true_char;
value_print (value_from_longest (type, *val_long), stream, &opts);
if (!record_full_message_wrapper_safe (regcache,
GDB_SIGNAL_0))
- {
+ {
status->kind = TARGET_WAITKIND_STOPPED;
status->value.sig = GDB_SIGNAL_0;
break;
- }
+ }
process_stratum_target *proc_target
= current_inferior ()->process_target ();
#if GDB_SELF_TEST
selftests::register_test ("get_thread_arch_aspace_regcache",
- selftests::get_thread_arch_aspace_regcache_test);
+ selftests::get_thread_arch_aspace_regcache_test);
selftests::register_test ("registers_changed_ptid_all",
selftests::registers_changed_ptid_all_test);
selftests::register_test ("registers_changed_ptid_target",
- selftests::registers_changed_ptid_target_test);
+ selftests::registers_changed_ptid_target_test);
selftests::register_test ("registers_changed_ptid_target_pid",
- selftests::registers_changed_ptid_target_pid_test);
+ selftests::registers_changed_ptid_target_pid_test);
selftests::register_test ("registers_changed_ptid_target_ptid",
selftests::registers_changed_ptid_target_ptid_test);
{
int repeat;
- csum += c;
+ csum += c;
c = readchar (remote_timeout);
csum += c;
repeat = c - ' ' + 3; /* Compute repeat count. */
continue;
}
else if ((op & 0xffff0000) == 0x38210000)
- { /* addi r1,r1,SIMM */
- fdata->frameless = 0;
- fdata->offset += SIGNED_SHORT (op);
- offset = fdata->offset;
- continue;
- }
+ { /* addi r1,r1,SIMM */
+ fdata->frameless = 0;
+ fdata->offset += SIGNED_SHORT (op);
+ offset = fdata->offset;
+ continue;
+ }
/* Load up minimal toc pointer. Do not treat an epilogue restore
of r31 as a minimal TOC load. */
else if (((op >> 22) == 0x20f || /* l r31,... or l r30,... */
/* move parameters from argument registers to local variable
registers */
- }
+ }
else if ((op & 0xfc0007fe) == 0x7c000378 && /* mr(.) Rx,Ry */
(((op >> 21) & 31) >= 3) && /* R3 >= Ry >= R10 */
(((op >> 21) & 31) <= 10) &&
}
continue;
- }
+ }
/* Store gen register S at (r31+r0).
Store param on stack when offset from SP bigger than 4 bytes. */
/* 000100 sssss 11111 00000 01100100000 */
{
ops = serial_interface_lookup ("terminal");
if (!ops)
- ops = serial_interface_lookup ("hardwire");
+ ops = serial_interface_lookup ("hardwire");
}
if (!ops)
{
struct type *func_type = function ? value_type (function) : NULL;
- if (sh_use_struct_convention_nofpu (
- sh_is_renesas_calling_convention (func_type), type))
+ if (sh_use_struct_convention_nofpu
+ (sh_is_renesas_calling_convention (func_type), type))
return RETURN_VALUE_STRUCT_CONVENTION;
if (writebuf)
sh_store_return_value_nofpu (type, regcache, writebuf);
uiout->field_string ("file", symtab_to_filename_for_display (s),
file_name_style.style ());
if (uiout->is_mi_like_p () || !uiout->test_flags (ui_source_list))
- {
+ {
const char *s_fullname = symtab_to_fullname (s);
char *local_fullname;
strcpy (local_fullname, s_fullname);
uiout->field_string ("fullname", local_fullname);
- }
+ }
uiout->text ("\n");
}
the type for the base class, and a terminating semicolon.
A typical example, with two base classes, would be "!2,020,19;0264,21;".
- ^^ ^ ^ ^ ^ ^ ^
+ ^^ ^ ^ ^ ^ ^ ^
Baseclass information marker __________________|| | | | | | |
Number of baseclasses __________________________| | | | | | |
Visibility specifiers (2) ________________________| | | | | |
if (thisfun != NULL)
return_type = TYPE_TARGET_TYPE (SYMBOL_TYPE (thisfun));
if (return_type == NULL)
- {
+ {
if (retval_expr->first_opcode () != UNOP_CAST
&& retval_expr->first_opcode () != UNOP_CAST_TYPE)
error (_("Return value type not available for selected "
if (ch == '#')
{
- ch = getDebugChar ();
- xmitcsum = hex (ch) << 4;
- ch = getDebugChar ();
- xmitcsum += hex (ch);
+ ch = getDebugChar ();
+ xmitcsum = hex (ch) << 4;
+ ch = getDebugChar ();
+ xmitcsum += hex (ch);
if (checksum != xmitcsum)
{
putDebugChar (buffer[0]);
putDebugChar (buffer[1]);
- return &buffer[3];
+ return &buffer[3];
}
return &buffer[0];
recursive_trap:
st %l5, [%lo(in_trap_handler) + %l4]
sub %sp,(16+1+6+1+72)*4,%sp ! Make room for input & locals
- ! + hidden arg + arg spill
+ ! + hidden arg + arg spill
! + doubleword alignment
! + registers[72] local var
osp = &addrs[i];
if (osp->sectindex == -1)
- continue;
+ continue;
/* Record all sections in offsets. */
/* The section_offsets in the objfile are here filled in using
/* If the cache hasn't been created yet, avoid creating one. */
cache = symbol_cache_key.get (pspace);
if (cache == NULL)
- printf_filtered (" empty, no stats available\n");
+ printf_filtered (" empty, no stats available\n");
else
symbol_cache_stats (cache);
}
if (sal.line > 0 && find_line_pc_range (sal, &start_pc, &end_pc))
{
if (start_pc == end_pc)
- {
+ {
printf_filtered ("Line %d of \"%s\"",
sal.line,
symtab_to_filename_for_display (sal.symtab));
&& start_pc != end_pc)
printf_filtered ("Attempting to find line %d instead.\n",
sal.line);
- else
+ else
error (_("Cannot find a good line."));
- }
+ }
}
else
{
{
sh = get_shell ();
if (cygwin_conv_path (CCP_POSIX_TO_WIN_W, sh, shell, __PMAX) < 0)
- error (_("Error starting executable via shell: %d"), errno);
+ error (_("Error starting executable via shell: %d"), errno);
#ifdef __USEWIDE
len = sizeof (L" -c 'exec '") + mbstowcs (NULL, exec_file, 0)
+ mbstowcs (NULL, allargs, 0) + 2;
static int
xtensa_register_reggroup_p (struct gdbarch *gdbarch,
int regnum,
- struct reggroup *group)
+ struct reggroup *group)
{
xtensa_register_t* reg = &gdbarch_tdep (gdbarch)->regmap[regnum];
xtensa_register_type_t type = reg->type;
xtensa_write_register (arreg, a7_saved);
}
return xtWindowUnderflow;
- default: /* Simply skip this insns. */
+ default: /* Simply skip this insns. */
continue;
}
int main()
{ int local_var = 1;
- ....
+ ....
}
because, for this source code, both Xtensa compilers will generate two