Replace spaces with tabs in a bunch of places.
Change-Id: If0f87180f1d13028dc178e5a8af7882a067868b0
break;
case PTT_READ_VEC:
case PTT_READ_VSX:
- if (debug_aix_thread)
- gdb_printf (gdb_stdlog,
- "ptrace (%d, %d) = %d (errno = %d)\n",
- req, id, ret, errno);
+ if (debug_aix_thread)
+ gdb_printf (gdb_stdlog,
+ "ptrace (%d, %d) = %d (errno = %d)\n",
+ req, id, ret, errno);
if (ret == -1)
return -1;
break;
else
ret = ptrace32 (PTT_READ_VSX, tid, (long long) &vsx, 0, 0);
if (ret < 0)
- memset(&vsx, 0, sizeof(__vsx_context_t));
+ memset(&vsx, 0, sizeof(__vsx_context_t));
for (i = 0; i < ppc_num_vshrs; i++)
- regcache->raw_supply (tdep->ppc_vsr0_upper_regnum + i, &(vsx.__vsr_dw1[i]));
+ regcache->raw_supply (tdep->ppc_vsr0_upper_regnum + i, &(vsx.__vsr_dw1[i]));
}
/* Floating-point registers. */
for (regno = 0; regno < ppc_num_vshrs; regno++)
if (REG_VALID == regcache->get_register_status ( tdep->ppc_vsr0_upper_regnum + regno))
regcache->raw_collect (tdep->ppc_vsr0_upper_regnum + regno,
- &(vsx->__vsr_dw1[0]) + regno);
+ &(vsx->__vsr_dw1[0]) + regno);
}
/* Store the gp registers into an array of uint32_t or uint64_t. */
__sighandler_t *sf_handler;
} sf_ahu;
ucontext_t sf_uc;
- ...
+ ...
}
ucontext_t is defined as:
&& cust->producer () != nullptr
&& (producer_is_llvm (cust->producer ())
|| producer_is_icc_ge_19 (cust->producer ()))))
- return std::max (start_pc, post_prologue_pc);
+ return std::max (start_pc, post_prologue_pc);
}
amd64_init_frame_cache (&cache);
di, arc_delayed_print_insn, &insn);
if (insn.insn_class == BRCC)
- {
- /* If more than one conditional branch is found, this is not
- the pattern we are interested in. */
- if (found_bc)
+ {
+ /* If more than one conditional branch is found, this is not
+ the pattern we are interested in. */
+ if (found_bc)
break;
found_bc = true;
continue;
- }
+ }
/* This is almost a happy ending. */
if (insn.insn_class == SCOND)
- {
+ {
/* SCOND should match the LLOCK's data size. */
if (insn.data_size_mode == llock_data_size_mode)
is_pattern_valid = true;
break;
- }
+ }
}
if (is_pattern_valid)
prev_regnum);
CORE_ADDR pc = value_as_address (value);
return frame_unwind_got_constant (this_frame, prev_regnum,
- UNMAKE_THUMB_ADDR (pc));
+ UNMAKE_THUMB_ADDR (pc));
}
/* The value might be one of the alternative SP, if so, use the
const char *suffix;
gdb::observers::new_objfile.attach (auto_load_new_objfile,
- auto_load_new_objfile_observer_token,
- "auto-load");
+ auto_load_new_objfile_observer_token,
+ "auto-load");
add_setshow_boolean_cmd ("gdb-scripts", class_support,
&auto_load_gdb_scripts, _("\
Enable or disable auto-loading of canned sequences of commands scripts."), _("\
without a footnote. On the CLI, for enabled locations whose
breakpoint is disabled, display "y-". */
auto get_enable_state = [uiout, loc] () -> const char *
- {
+ {
if (uiout->is_mi_like_p ())
{
if (loc->disabled_by_cond)
bool use_fixed_output =
(uiout->test_flags (fix_breakpoint_script_output)
- || fix_breakpoint_script_output_globally);
+ || fix_breakpoint_script_output_globally);
gdb::optional<ui_out_emit_tuple> tuple_emitter;
gdb::optional<ui_out_emit_list> list_emitter;
const counted_command_line *commands);
static void do_document_command (const char *comname, int from_tty,
- const counted_command_line *commands);
+ const counted_command_line *commands);
static const char *read_next_line (std::string &buffer);
command and the commands are provided. */
static void
do_document_command (const char *comname, int from_tty,
- const counted_command_line *commands)
+ const counted_command_line *commands)
{
struct cmd_list_element *alias, *prefix_cmd, *c;
const char *comfull;
if (commands == nullptr)
{
std::string prompt
- = string_printf ("Type documentation for \"%s\".", comfull);
+ = string_printf ("Type documentation for \"%s\".", comfull);
doclines = read_command_lines (prompt.c_str (), from_tty, 0, 0);
}
else
as this helps the user to either type the command name and/or
its prefixes. */
document_cmd_element = add_com ("document", class_support, document_command,
- _("\
+ _("\
Document a user-defined command or user-defined alias.\n\
Give command or alias name as argument. Give documentation on following lines.\n\
End with a line of just \"end\"."));
switch (multi)
{
case 0: /* Bank1. */
- {
- sprintf (tdesc_reg.name, "cp1cr%d", remain);
- tdesc_reg.num = 189 + remain;
- }
- break;
+ {
+ sprintf (tdesc_reg.name, "cp1cr%d", remain);
+ tdesc_reg.num = 189 + remain;
+ }
+ break;
case 1: /* Bank2. */
- {
- sprintf (tdesc_reg.name, "cp2cr%d", remain);
- tdesc_reg.num = 276 + remain;
- }
- break;
+ {
+ sprintf (tdesc_reg.name, "cp2cr%d", remain);
+ tdesc_reg.num = 276 + remain;
+ }
+ break;
case 2: /* Bank3. */
- {
- sprintf (tdesc_reg.name, "cp3cr%d", remain);
- tdesc_reg.num = 221 + remain;
- }
- break;
+ {
+ sprintf (tdesc_reg.name, "cp3cr%d", remain);
+ tdesc_reg.num = 221 + remain;
+ }
+ break;
case 3: /* Bank4. */
case 4: /* Bank5. */
case 5: /* Bank6. */
case 11: /* Bank12. */
case 12: /* Bank13. */
case 13: /* Bank14. */
- {
- /* Regitsers in Bank4~14 have continuous regno with start 308. */
- sprintf (tdesc_reg.name, "cp%dcr%d", (multi + 1), remain);
- tdesc_reg.num = 308 + ((multi - 3) * 32) + remain;
- }
- break;
+ {
+ /* Regitsers in Bank4~14 have continuous regno with start 308. */
+ sprintf (tdesc_reg.name, "cp%dcr%d", (multi + 1), remain);
+ tdesc_reg.num = 308 + ((multi - 3) * 32) + remain;
+ }
+ break;
case 14: /* Bank16. */
case 15: /* Bank17. */
case 16: /* Bank18. */
case 27: /* Bank29. */
case 28: /* Bank30. */
case 29: /* Bank31. */
- {
- /* Regitsers in Bank16~31 have continuous regno with start 660. */
- sprintf (tdesc_reg.name, "cp%dcr%d", (multi + 2), remain);
- tdesc_reg.num = 660 + ((multi - 14) * 32) + remain;
- }
- break;
+ {
+ /* Regitsers in Bank16~31 have continuous regno with start 660. */
+ sprintf (tdesc_reg.name, "cp%dcr%d", (multi + 2), remain);
+ tdesc_reg.num = 660 + ((multi - 14) * 32) + remain;
+ }
+ break;
default:
- return NULL;
+ return NULL;
}
return &tdesc_reg;
}
{
struct type *tdesc_t = tdesc_register_type (gdbarch, reg_nr);
if (tdesc_t)
- return tdesc_t;
+ return tdesc_t;
}
/* PC, EPC, FPC is a text pointer. */
if (tdesc_has_registers (gdbarch_target_desc (gdbarch)))
{
if (tdesc_register_in_reggroup_p (gdbarch, regnum, reggroup) > 0)
- return 7;
+ return 7;
}
return 0;
char name_buf[4];
xsnprintf (name_buf, sizeof (name_buf), "s%d",
- dw_reg - FV_PSEUDO_REGNO_FIRST);
+ dw_reg - FV_PSEUDO_REGNO_FIRST);
return user_reg_map_name_to_regnum (gdbarch, name_buf,
- strlen (name_buf));
+ strlen (name_buf));
}
/* Others, unknown. */
for (i = 0; i < 16; i++)
{
if ((strcmp (reg->name, csky_supported_fpu_regs[i].name) == 0)
- && (csky_supported_fpu_regs[i].num == reg->num))
- return (1 << i);
+ && (csky_supported_fpu_regs[i].num == reg->num))
+ return (1 << i);
}
return 0;
for (i = 0; i < 16; i++)
{
if ((strcmp (reg->name, csky_supported_fpu_regs[i + 16].name) == 0)
- && (csky_supported_fpu_regs[i + 16].num == reg->num))
- return (1 << i);
+ && (csky_supported_fpu_regs[i + 16].num == reg->num))
+ return (1 << i);
}
return 0;
for (i = 0; i < 16; i++)
{
if ((strcmp (reg->name, csky_supported_fpu_regs[i + 32].name) == 0)
- && (csky_supported_fpu_regs[i + 32].num == reg->num))
- return (1 << i);
+ && (csky_supported_fpu_regs[i + 32].num == reg->num))
+ return (1 << i);
}
return 0;
if (tdep->fv_pseudo_registers_count)
{
static const char *const fv_pseudo_names[] = {
- "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
- "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15",
- "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23",
- "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31",
- "s32", "s33", "s34", "s35", "s36", "s37", "s38", "s39",
- "s40", "s41", "s42", "s43", "s44", "s45", "s46", "s47",
- "s48", "s49", "s50", "s51", "s52", "s53", "s54", "s55",
- "s56", "s57", "s58", "s59", "s60", "s61", "s62", "s63",
- "s64", "s65", "s66", "s67", "s68", "s69", "s70", "s71",
- "s72", "s73", "s74", "s75", "s76", "s77", "s78", "s79",
- "s80", "s81", "s82", "s83", "s84", "s85", "s86", "s87",
- "s88", "s89", "s90", "s91", "s92", "s93", "s94", "s95",
- "s96", "s97", "s98", "s99", "s100", "s101", "s102", "s103",
- "s104", "s105", "s106", "s107", "s108", "s109", "s110", "s111",
- "s112", "s113", "s114", "s115", "s116", "s117", "s118", "s119",
- "s120", "s121", "s122", "s123", "s124", "s125", "s126", "s127",
+ "s0", "s1", "s2", "s3", "s4", "s5", "s6", "s7",
+ "s8", "s9", "s10", "s11", "s12", "s13", "s14", "s15",
+ "s16", "s17", "s18", "s19", "s20", "s21", "s22", "s23",
+ "s24", "s25", "s26", "s27", "s28", "s29", "s30", "s31",
+ "s32", "s33", "s34", "s35", "s36", "s37", "s38", "s39",
+ "s40", "s41", "s42", "s43", "s44", "s45", "s46", "s47",
+ "s48", "s49", "s50", "s51", "s52", "s53", "s54", "s55",
+ "s56", "s57", "s58", "s59", "s60", "s61", "s62", "s63",
+ "s64", "s65", "s66", "s67", "s68", "s69", "s70", "s71",
+ "s72", "s73", "s74", "s75", "s76", "s77", "s78", "s79",
+ "s80", "s81", "s82", "s83", "s84", "s85", "s86", "s87",
+ "s88", "s89", "s90", "s91", "s92", "s93", "s94", "s95",
+ "s96", "s97", "s98", "s99", "s100", "s101", "s102", "s103",
+ "s104", "s105", "s106", "s107", "s108", "s109", "s110", "s111",
+ "s112", "s113", "s114", "s115", "s116", "s117", "s118", "s119",
+ "s120", "s121", "s122", "s123", "s124", "s125", "s126", "s127",
};
if (regno < tdep->fv_pseudo_registers_count)
- {
- if ((regno < 64) && ((regno % 4) >= 2) && !tdep->has_vr0)
- return "";
- else if ((regno >= 64) && ((regno % 4) >= 2))
- return "";
- else
- return fv_pseudo_names[regno];
- }
+ {
+ if ((regno < 64) && ((regno % 4) >= 2) && !tdep->has_vr0)
+ return "";
+ else if ((regno >= 64) && ((regno % 4) >= 2))
+ return "";
+ else
+ return fv_pseudo_names[regno];
+ }
}
return "";
static enum register_status
csky_pseudo_register_read (struct gdbarch *gdbarch,
- struct readable_regcache *regcache,
- int regnum, gdb_byte *buf)
+ struct readable_regcache *regcache,
+ int regnum, gdb_byte *buf)
{
int num_regs = gdbarch_num_regs (gdbarch);
csky_gdbarch_tdep *tdep
/* Ensure getting s0~s63 from vrx if tdep->has_vr0 is ture. */
if (tdep->has_vr0)
- {
- if (regnum < 64)
- {
- gdb_regnum = CSKY_VR0_REGNUM + (regnum / 4);
- offset = (regnum % 4) * 4;
- }
- else
- {
- gdb_regnum = CSKY_FR16_REGNUM + ((regnum - 64) / 4);
- if ((regnum % 4) >= 2)
- return REG_UNAVAILABLE;
- offset = (regnum % 2) * 4;
- }
- }
+ {
+ if (regnum < 64)
+ {
+ gdb_regnum = CSKY_VR0_REGNUM + (regnum / 4);
+ offset = (regnum % 4) * 4;
+ }
+ else
+ {
+ gdb_regnum = CSKY_FR16_REGNUM + ((regnum - 64) / 4);
+ if ((regnum % 4) >= 2)
+ return REG_UNAVAILABLE;
+ offset = (regnum % 2) * 4;
+ }
+ }
else
- {
- gdb_regnum = CSKY_FR0_REGNUM + (regnum / 4);
- if ((regnum % 4) >= 2)
- return REG_UNAVAILABLE;
- offset = (regnum % 2) * 4;
- }
+ {
+ gdb_regnum = CSKY_FR0_REGNUM + (regnum / 4);
+ if ((regnum % 4) >= 2)
+ return REG_UNAVAILABLE;
+ offset = (regnum % 2) * 4;
+ }
status = regcache->raw_read (gdb_regnum, reg_buf);
if (status == REG_VALID)
- memcpy (buf, reg_buf + offset, 4);
+ memcpy (buf, reg_buf + offset, 4);
return status;
}
static void
csky_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
- int regnum, const gdb_byte *buf)
+ int regnum, const gdb_byte *buf)
{
int num_regs = gdbarch_num_regs (gdbarch);
csky_gdbarch_tdep *tdep
int offset = 0;
if (tdep->has_vr0)
- {
- if (regnum < 64)
- {
- gdb_regnum = CSKY_VR0_REGNUM + (regnum / 4);
- offset = (regnum % 4) * 4;
- }
- else
- {
- gdb_regnum = CSKY_FR16_REGNUM + ((regnum - 64) / 4);
- if ((regnum % 4) >= 2)
- return;
- offset = (regnum % 2) * 4;
- }
- }
+ {
+ if (regnum < 64)
+ {
+ gdb_regnum = CSKY_VR0_REGNUM + (regnum / 4);
+ offset = (regnum % 4) * 4;
+ }
+ else
+ {
+ gdb_regnum = CSKY_FR16_REGNUM + ((regnum - 64) / 4);
+ if ((regnum % 4) >= 2)
+ return;
+ offset = (regnum % 2) * 4;
+ }
+ }
else
- {
- gdb_regnum = CSKY_FR0_REGNUM + (regnum / 4);
- if ((regnum % 4) >= 2)
- return;
- offset = (regnum % 2) * 4;
- }
+ {
+ gdb_regnum = CSKY_FR0_REGNUM + (regnum / 4);
+ if ((regnum % 4) >= 2)
+ return;
+ offset = (regnum % 2) * 4;
+ }
regcache->raw_read (gdb_regnum, reg_buf);
memcpy (reg_buf + offset, buf, 4);
int i = 0;
int feature_names_count = ARRAY_SIZE (csky_supported_tdesc_feature_names);
int support_tdesc_regs_count
- = csky_get_supported_tdesc_registers_count();
+ = csky_get_supported_tdesc_registers_count();
const struct csky_supported_tdesc_register *tdesc_reg;
const struct tdesc_feature *feature;
tdesc_data = tdesc_data_alloc ();
for (index = 0; index < feature_names_count; index ++)
- {
- feature = tdesc_find_feature (info.target_desc,
- csky_supported_tdesc_feature_names[index]);
- if (feature != NULL)
- {
- for (i = 0; i < support_tdesc_regs_count; i++)
- {
- tdesc_reg = csky_get_supported_register_by_index (i);
- if (!tdesc_reg)
- break;
- numbered = tdesc_numbered_register (feature, tdesc_data.get(),
- tdesc_reg->num,
- tdesc_reg->name);
- if (numbered) {
- valid_p |= csky_essential_reg_check (tdesc_reg);
- has_fr0 |= csky_fr0_fr15_reg_check (tdesc_reg);
- has_fr16 |= csky_fr16_fr31_reg_check (tdesc_reg);
- has_vr0 |= csky_vr0_vr15_reg_check (tdesc_reg);
- if (num_regs < tdesc_reg->num)
- num_regs = tdesc_reg->num;
- }
- }
- }
- }
+ {
+ feature = tdesc_find_feature (info.target_desc,
+ csky_supported_tdesc_feature_names[index]);
+ if (feature != NULL)
+ {
+ for (i = 0; i < support_tdesc_regs_count; i++)
+ {
+ tdesc_reg = csky_get_supported_register_by_index (i);
+ if (!tdesc_reg)
+ break;
+ numbered = tdesc_numbered_register (feature, tdesc_data.get(),
+ tdesc_reg->num,
+ tdesc_reg->name);
+ if (numbered) {
+ valid_p |= csky_essential_reg_check (tdesc_reg);
+ has_fr0 |= csky_fr0_fr15_reg_check (tdesc_reg);
+ has_fr16 |= csky_fr16_fr31_reg_check (tdesc_reg);
+ has_vr0 |= csky_vr0_vr15_reg_check (tdesc_reg);
+ if (num_regs < tdesc_reg->num)
+ num_regs = tdesc_reg->num;
+ }
+ }
+ }
+ }
if (valid_p != CSKY_TDESC_REGS_ESSENTIAL_VALUE)
- return NULL;
+ return NULL;
}
/* When the type of bfd file is srec(or any files are not elf),
{
/* Get FPU, VDSP build options. */
fpu_abi = bfd_elf_get_obj_attr_int (info.abfd,
- OBJ_ATTR_PROC,
- Tag_CSKY_FPU_ABI);
+ OBJ_ATTR_PROC,
+ Tag_CSKY_FPU_ABI);
vdsp_version = bfd_elf_get_obj_attr_int (info.abfd,
- OBJ_ATTR_PROC,
- Tag_CSKY_VDSP_VERSION);
+ OBJ_ATTR_PROC,
+ Tag_CSKY_VDSP_VERSION);
fpu_hardfp = bfd_elf_get_obj_attr_int (info.abfd,
- OBJ_ATTR_PROC,
- Tag_CSKY_FPU_HARDFP);
+ OBJ_ATTR_PROC,
+ Tag_CSKY_FPU_HARDFP);
}
/* Find a candidate among the list of pre-declared architectures. */
csky_gdbarch_tdep *tdep
= gdbarch_tdep<csky_gdbarch_tdep> (arches->gdbarch);
if (fpu_abi != tdep->fpu_abi)
- continue;
+ continue;
if (vdsp_version != tdep->vdsp_version)
- continue;
+ continue;
if (fpu_hardfp != tdep->fpu_hardfp)
- continue;
+ continue;
/* Found a match. */
return arches->gdbarch;
if (tdesc_data != NULL)
{
if ((has_vr0 == CSKY_FULL16_ONEHOT_VALUE)
- && (has_fr16 == CSKY_FULL16_ONEHOT_VALUE))
- {
- tdep->has_vr0 = 1;
- tdep->fv_pseudo_registers_count = 128;
- }
+ && (has_fr16 == CSKY_FULL16_ONEHOT_VALUE))
+ {
+ tdep->has_vr0 = 1;
+ tdep->fv_pseudo_registers_count = 128;
+ }
else if ((has_vr0 == CSKY_FULL16_ONEHOT_VALUE)
- && (has_fr16 != CSKY_FULL16_ONEHOT_VALUE))
- {
- tdep->has_vr0 = 1;
- tdep->fv_pseudo_registers_count = 64;
- }
+ && (has_fr16 != CSKY_FULL16_ONEHOT_VALUE))
+ {
+ tdep->has_vr0 = 1;
+ tdep->fv_pseudo_registers_count = 64;
+ }
else if ((has_fr0 == CSKY_FULL16_ONEHOT_VALUE)
- && (has_vr0 != CSKY_FULL16_ONEHOT_VALUE))
- {
- tdep->has_vr0 = 0;
- tdep->fv_pseudo_registers_count = 64;
- }
+ && (has_vr0 != CSKY_FULL16_ONEHOT_VALUE))
+ {
+ tdep->has_vr0 = 0;
+ tdep->fv_pseudo_registers_count = 64;
+ }
else
- {
- tdep->has_vr0 = 0;
- tdep->fv_pseudo_registers_count = 0;
- }
+ {
+ tdep->has_vr0 = 0;
+ tdep->fv_pseudo_registers_count = 0;
+ }
}
else
{
tdesc_use_registers (gdbarch, info.target_desc, std::move (tdesc_data));
set_gdbarch_register_type (gdbarch, csky_register_type);
set_gdbarch_register_reggroup_p (gdbarch,
- csky_register_reggroup_p);
+ csky_register_reggroup_p);
}
if (tdep->fv_pseudo_registers_count)
{
set_gdbarch_num_pseudo_regs (gdbarch,
- tdep->fv_pseudo_registers_count);
+ tdep->fv_pseudo_registers_count);
set_gdbarch_pseudo_register_read (gdbarch,
- csky_pseudo_register_read);
+ csky_pseudo_register_read);
set_gdbarch_pseudo_register_write (gdbarch,
- csky_pseudo_register_write);
+ csky_pseudo_register_write);
set_tdesc_pseudo_register_name (gdbarch, csky_pseudo_register_name);
}
if (WIFEXITED (wstatus))
{
status->set_exited (WEXITSTATUS (wstatus));
- inferior_debug (4, _("darwin_wait: pid=%d exit, status=0x%x\n"),
+ inferior_debug (4, _("darwin_wait: pid=%d exit, status=0x%x\n"),
res_pid, wstatus);
}
else if (WIFSTOPPED (wstatus))
{
status->set_ignore ();
warning (_("Unexpected wait status after MACH_NOTIFY_DEAD_NAME "
- "notification: 0x%x"), wstatus);
+ "notification: 0x%x"), wstatus);
return minus_one_ptid;
}
cu->addr_base = stub_comp_unit_die->addr_base ();
/* There should be a DW_AT_GNU_ranges_base attribute here (if needed).
- We need the value before we can process DW_AT_ranges values from the
- DWO. */
+ We need the value before we can process DW_AT_ranges values from the
+ DWO. */
cu->gnu_ranges_base = stub_comp_unit_die->gnu_ranges_base ();
/* For DWARF5: record the DW_AT_rnglists_base value from the skeleton. If
- there are attributes of form DW_FORM_rnglistx in the skeleton, they'll
- need the rnglists base. Attributes of form DW_FORM_rnglistx in the
- split unit don't use it, as the DWO has its own .debug_rnglists.dwo
- section. */
+ there are attributes of form DW_FORM_rnglistx in the skeleton, they'll
+ need the rnglists base. Attributes of form DW_FORM_rnglistx in the
+ split unit don't use it, as the DWO has its own .debug_rnglists.dwo
+ section. */
cu->rnglists_base = stub_comp_unit_die->rnglists_base ();
}
else if (stub_comp_dir != NULL)
&& !die_is_declaration (die, cu))
{
if (die->tag == DW_TAG_namelist_item)
- {
+ {
/* Typically, DW_TAG_namelist_item are references to namelist items.
If so, follow that reference. */
struct attribute *attr1 = dwarf2_attr (die, DW_AT_namelist_item, cu);
struct die_info *item_die = nullptr;
struct dwarf2_cu *item_cu = cu;
- if (attr1->form_is_ref ())
+ if (attr1->form_is_ref ())
item_die = follow_die_ref (die, attr1, &item_cu);
if (item_die != nullptr)
die = item_die;
- }
+ }
/* Data member other than a C++ static data member. */
/* Get type of field. */
have linkage name present but name is absent. */
if (name != nullptr
|| (abbrev->tag != DW_TAG_subprogram
- && abbrev->tag != DW_TAG_inlined_subroutine
- && abbrev->tag != DW_TAG_entry_point))
+ && abbrev->tag != DW_TAG_inlined_subroutine
+ && abbrev->tag != DW_TAG_entry_point))
flags = flags | IS_LINKAGE;
m_index_storage->add (this_die, abbrev->tag, flags,
linkage_name, nullptr, m_per_cu);
if (reader->cu->header.version >= 5)
{
/* We have a DWARF5 CU with a reference to a .debug_str_offsets section,
- so assume the .debug_str_offsets section is DWARF5 as well, and
+ so assume the .debug_str_offsets section is DWARF5 as well, and
parse the header. FIXME: Parse the header only once. */
unsigned int bytes_read = 0;
bfd *abfd = reader->dwo_file->sections.str_offsets.get_bfd_owner ();
name = dwarf2_name (die, cu);
if (name == nullptr && (die->tag == DW_TAG_subprogram
- || die->tag == DW_TAG_inlined_subroutine
- || die->tag == DW_TAG_entry_point))
+ || die->tag == DW_TAG_inlined_subroutine
+ || die->tag == DW_TAG_entry_point))
name = dw2_linkage_name (die, cu);
if (name)
};
extern void dwarf2_get_section_info (struct objfile *,
- enum dwarf2_section_enum,
+ enum dwarf2_section_enum,
asection **, const gdb_byte **,
bfd_size_type *);
start_dimension (INDEX_TYPE, 3, false);
start_dimension (INDEX_TYPE, 2, true);
- process_element (TYPE, OFFSET, false);
- process_element (TYPE, OFFSET, true);
+ process_element (TYPE, OFFSET, false);
+ process_element (TYPE, OFFSET, true);
finish_dimension (true, false);
start_dimension (INDEX_TYPE, 2, true);
- process_element (TYPE, OFFSET, false);
- process_element (TYPE, OFFSET, true);
+ process_element (TYPE, OFFSET, false);
+ process_element (TYPE, OFFSET, true);
finish_dimension (true, true);
start_dimension (INDEX_TYPE, 2, true);
- process_element (TYPE, OFFSET, false);
- process_element (TYPE, OFFSET, true);
+ process_element (TYPE, OFFSET, false);
+ process_element (TYPE, OFFSET, true);
finish_dimension (true, true);
finish_dimension (false, true); */
void process_element (struct type *elt_type, LONGEST elt_off,
if (type->code () == TYPE_CODE_UNION)
prefix = "Type, C_Union :: ";
else if (type->code () == TYPE_CODE_STRUCT
- || type->code () == TYPE_CODE_NAMELIST)
+ || type->code () == TYPE_CODE_NAMELIST)
prefix = "Type ";
gdb_printf (stream, "%*s%s%s", level, "", prefix, type->name ());
return;
break;
case TYPE_CODE_FUNC:
INIT_FUNC_SPECIFIC (type);
- break;
+ break;
case TYPE_CODE_FIXED_POINT:
INIT_FIXED_POINT_SPECIFIC (type);
break;
new_type->field (i).set_loc_physname
(xstrdup (type->field (i).loc_physname ()));
break;
- case FIELD_LOC_KIND_DWARF_BLOCK:
- new_type->field (i).set_loc_dwarf_block
+ case FIELD_LOC_KIND_DWARF_BLOCK:
+ new_type->field (i).set_loc_dwarf_block
(type->field (i).loc_dwarf_block ());
- break;
+ break;
default:
internal_error (_("Unexpected type field location kind: %d"),
type->field (i).loc_kind ());
The API is inspired from GMP's mpz_export, hence the naming and types
of the following parameter:
- ENDIAN should be:
- . 1 for most significant byte first; or
+ . 1 for most significant byte first; or
. -1 for least significant byte first; or
. 0 for native endianness.
{
*except_scmp
= gdbscm_make_out_of_range_error
- (func_name, obj_arg_pos, obj,
+ (func_name, obj_arg_pos, obj,
_("value out of range for type"));
return NULL;
}
__sighandler_t *sf_handler;
} sf_ahu;
ucontext_t sf_uc;
- ...
+ ...
}
ucontext_t is defined as:
&& cust->producer () != NULL
&& (producer_is_llvm (cust->producer ())
|| producer_is_icc_ge_19 (cust->producer ()))))
- return std::max (start_pc, post_prologue_pc);
+ return std::max (start_pc, post_prologue_pc);
}
cache.locals = -1;
if (orig_inf != follow_inf)
{
/* If the target was implicitly push in the original inferior, unpush
- it. */
+ it. */
scoped_restore_current_thread restore_thread;
switch_to_inferior_no_thread (orig_inf);
maybe_unpush_target ();
if (child_inf != nullptr)
{
/* If FOLLOW_CHILD, we leave CHILD_INF as the current inferior
- (do not restore the parent as the current inferior). */
+ (do not restore the parent as the current inferior). */
gdb::optional<scoped_restore_current_thread> maybe_restore;
if (!follow_child)
if (m_prev_enable_commit_resumed)
{
/* This is the outermost instance, re-enable
- COMMIT_RESUMED_STATE on the targets where it's possible. */
+ COMMIT_RESUMED_STATE on the targets where it's possible. */
maybe_set_commit_resumed_all_targets ();
}
else
if (should_resume)
{
/* Never call switch_back_to_stepped_thread if we are waiting for
- vfork-done (waiting for an external vfork child to exec or
+ vfork-done (waiting for an external vfork child to exec or
exit). We will resume only the vforking thread for the purpose
of collecting the vfork-done event, and we will restart any
step once the critical shared address space window is done. */
return;
}
else if (get_frame_id (get_current_frame ())
- == ecs->event_thread->control.step_frame_id)
+ == ecs->event_thread->control.step_frame_id)
{
/* We are not at the start of a statement, and we have not changed
frame.
if (tp->has_pending_waitstatus ())
{
/* If the thread has a pending event, and it was stopped with a
- signal, use that signal to resume it. If it has a pending
+ signal, use that signal to resume it. If it has a pending
event of another kind, it was not stopped with a signal, so
resume it without a signal. */
if (tp->pending_waitstatus ().kind () == TARGET_WAITKIND_STOPPED)
libpthread_objfile_p (objfile *obj)
{
return (libpthread_name_p (objfile_name (obj))
- && lookup_minimal_symbol ("pthread_create",
- NULL,
+ && lookup_minimal_symbol ("pthread_create",
+ NULL,
obj).minsym != NULL);
}
_initialize_loongarch_linux_tdep ()
{
gdbarch_register_osabi (bfd_arch_loongarch, bfd_mach_loongarch32,
- GDB_OSABI_LINUX, loongarch_linux_init_abi);
+ GDB_OSABI_LINUX, loongarch_linux_init_abi);
gdbarch_register_osabi (bfd_arch_loongarch, bfd_mach_loongarch64,
- GDB_OSABI_LINUX, loongarch_linux_init_abi);
+ GDB_OSABI_LINUX, loongarch_linux_init_abi);
}
and the signed integer scalars are sign-extended. */
if (type->is_unsigned ())
{
- ULONGEST data = extract_unsigned_integer (val, len, BFD_ENDIAN_LITTLE);
+ ULONGEST data = extract_unsigned_integer (val, len, BFD_ENDIAN_LITTLE);
if (gar > 0)
pass_in_gar (regcache, gar--, (gdb_byte *) &data);
else
pass_on_stack (regcache, (gdb_byte *) &data, len, align, &addr);
- }
+ }
else
{
LONGEST data = extract_signed_integer (val, len, BFD_ENDIAN_LITTLE);
pass_in_gar (regcache, gar--, (gdb_byte *) &data);
else
pass_on_stack (regcache, (gdb_byte *) &data, len, align, &addr);
- }
+ }
}
break;
case TYPE_CODE_FLT:
}
else if (len > 2 * regsize)
{
- /* It's passed by reference and are replaced in the argument list with the address.
+ /* It's passed by reference and are replaced in the argument list with the address.
If there is an available GAR, the reference is passed in the GAR,
and passed on the stack if no GAR is available. */
sp = align_down (sp - len, 16);
yield "< <", not "<<", etc. */
static void
append_tokens_without_splicing (growable_macro_buffer *dest,
- shared_macro_buffer *src)
+ shared_macro_buffer *src)
{
int original_dest_len = dest->len;
shared_macro_buffer dest_tail, new_token;
FILTERS is a list of words, each word is either:\n\
+ A section name - any section with this name will be printed, or\n\
+ A section flag - any section with this flag will be printed. The\n\
- known flags are:\n\
+ known flags are:\n\
ALLOC LOAD RELOC READONLY CODE DATA ROM CONSTRUCTOR\n\
HAS_CONTENTS NEVER_LOAD COFF_SHARED_LIBRARY IS_COMMON\n\
\n\
only the root VAROBJs. */
all_root_varobjs ([=] (varobj *var)
- {
- mi_cmd_var_update_iter (var, *name == '0', print_values);
- });
+ { mi_cmd_var_update_iter (var, *name == '0', print_values); });
}
else
{
constructor, FUNC is the function called from do_invoke, which
implements this MI command. */
mi_command_mi (const char *name, mi_cmd_argv_ftype func,
- int *suppress_notification)
+ int *suppress_notification)
: mi_command (name, suppress_notification),
m_argv_function (func)
{
forwarded to CLI_NAME as its argument string, otherwise, if ARGS_P is
false, nullptr is send to CLI_NAME as its argument string. */
mi_command_cli (const char *name, const char *cli_name, bool args_p,
- int *suppress_notification)
+ int *suppress_notification)
: mi_command (name, suppress_notification),
m_cli_name (cli_name),
m_args_p (args_p)
add_mi_cmd_mi ("catch-unload", mi_cmd_catch_unload,
&mi_suppress_notification.breakpoint);
add_mi_cmd_mi ("catch-throw", mi_cmd_catch_throw,
- &mi_suppress_notification.breakpoint),
+ &mi_suppress_notification.breakpoint),
add_mi_cmd_mi ("catch-rethrow", mi_cmd_catch_rethrow,
- &mi_suppress_notification.breakpoint),
+ &mi_suppress_notification.breakpoint),
add_mi_cmd_mi ("catch-catch", mi_cmd_catch_catch,
- &mi_suppress_notification.breakpoint),
+ &mi_suppress_notification.breakpoint),
add_mi_cmd_mi ("complete", mi_cmd_complete);
add_mi_cmd_mi ("data-disassemble", mi_cmd_disassemble);
add_mi_cmd_mi ("data-evaluate-expression", mi_cmd_data_evaluate_expression);
add_mi_cmd_mi ("symbol-info-types", mi_cmd_symbol_info_types);
add_mi_cmd_mi ("symbol-info-modules", mi_cmd_symbol_info_modules);
add_mi_cmd_mi ("symbol-info-module-functions",
- mi_cmd_symbol_info_module_functions);
+ mi_cmd_symbol_info_module_functions);
add_mi_cmd_mi ("symbol-info-module-variables",
- mi_cmd_symbol_info_module_variables);
+ mi_cmd_symbol_info_module_variables);
add_mi_cmd_cli ("target-attach", "attach", 1);
add_mi_cmd_mi ("target-detach", mi_cmd_target_detach);
add_mi_cmd_cli ("target-disconnect", "disconnect", 0);
From MIPSpro Assembly Language Programmer's Guide, Document Number:
007-2418-004
- Software
+ Software
Register Name(from
Name fgregdef.h) Use and Linkage
-----------------------------------------------------------------
$f0, $f2 fv0, fv1 Hold results of floating-point type function
- ($f0) and complex type function ($f0 has the
- real part, $f2 has the imaginary part.) */
+ ($f0) and complex type function ($f0 has the
+ real part, $f2 has the imaginary part.) */
if (type->length () > 2 * MIPS64_REGSIZE)
return RETURN_VALUE_STRUCT_CONVENTION;
}
/* Ensure the ptid is updated with an LWP id on the first stop
- of a process. */
+ of a process. */
if (!in_thread_list (this, wptid))
{
if (in_thread_list (this, ptid_t (pid)))
&& eltype->length () == 16
&& (gdbarch_long_double_format (gdbarch)
== floatformats_ieee_quad))
- /* IEEE FLOAT128, args in vector registers. */
+ /* IEEE FLOAT128, args in vector registers. */
{
ppc64_sysv_abi_push_vreg (gdbarch, elval, argpos);
align = 16;
}
else if (eltype->code () == TYPE_CODE_FLT
- || eltype->code () == TYPE_CODE_DECFLOAT)
+ || eltype->code () == TYPE_CODE_DECFLOAT)
/* IBM long double and all other floats and decfloats, args
are in a pair of floating point registers. */
ppc64_sysv_abi_push_freg (gdbarch, eltype, elval, argpos);
ARRAY_SIZE (ppc64_standard_linkage6)),
MAX (ARRAY_SIZE (ppc64_standard_linkage7),
ARRAY_SIZE (ppc64_standard_linkage8))),
- MAX (MAX (ARRAY_SIZE (ppc64_standard_linkage9),
+ MAX (MAX (ARRAY_SIZE (ppc64_standard_linkage9),
ARRAY_SIZE (ppc64_standard_linkage10)),
- MAX (ARRAY_SIZE (ppc64_standard_linkage11),
+ MAX (ARRAY_SIZE (ppc64_standard_linkage11),
ARRAY_SIZE (ppc64_standard_linkage12)))))
- 1];
if (orig_inf != follow_inf)
{
/* Execution continues in a new inferior, push the original inferior's
- process target on the new inferior's target stack. The process target
+ process target on the new inferior's target stack. The process target
may decide to unpush itself from the original inferior's target stack
after that, at its discretion. */
follow_inf->push_target (orig_inf->process_target ());
docstring.release (), cmd_list);
/* If successful, the above takes ownership of the name, since we set
- name_allocated, so release it. */
+ name_allocated, so release it. */
cmd_name.release ();
/* There appears to be no API to set this. */
gdbpy_handle_exception ();
for (Py_ssize_t i = 0; i < len; ++i)
{
- gdbpy_ref<> item (PySequence_ITEM (result, i));
+ gdbpy_ref<> item (PySequence_ITEM (result, i));
if (item == nullptr)
gdbpy_handle_exception ();
serialize_mi_result_1 (item.get (), nullptr);
if (cmd != nullptr && cmd_py == nullptr)
{
/* There is already an MI command registered with that name, and it's not
- a Python one. Forbid replacing a non-Python MI command. */
+ a Python one. Forbid replacing a non-Python MI command. */
PyErr_SetString (PyExc_RuntimeError,
_("unable to add command, name is already in use"));
return -1;
if (cmd_py != nullptr)
{
/* There is already a Python MI command registered with that name, swap
- in the new gdb.MICommand implementation. */
+ in the new gdb.MICommand implementation. */
cmd_py->swap_python_object (obj);
}
else
PyConfig_InitPythonConfig (&config);
PyStatus status = PyConfig_SetString (&config, &config.program_name,
- progname_copy);
+ progname_copy);
if (PyStatus_Exception (status))
goto init_done;
continue;
/* Need to switch to a specific thread, because remote_check_symbols
- uses INFERIOR_PTID to set the general thread. */
+ uses INFERIOR_PTID to set the general thread. */
scoped_restore_current_thread restore_thread;
thread_info *thread = any_thread_of_inferior (inf);
switch_to_thread (thread);
= get_remote_thread_info (inferior_thread ());
/* We don't expect the core to ask to resume an already resumed (from
- its point of view) thread. */
+ its point of view) thread. */
gdb_assert (remote_thr->get_resume_state () == resume_state::NOT_RESUMED);
remote_thr->set_resumed_pending_vcont (step, siggnal);
gdb_assert (!thread_is_in_step_over_chain (tp));
/* We should never be commit-resuming a thread that has a stop reply.
- Otherwise, we would end up reporting a stop event for a thread while
+ Otherwise, we would end up reporting a stop event for a thread while
it is running on the remote target. */
remote_state *rs = get_remote_state ();
for (const auto &stop_reply : rs->stop_reply_queue)
= remote_thr->resumed_pending_vcont_info ();
/* Check if we need to send a specific action for this thread. If not,
- it will be included in a wildcard resume instead. */
+ it will be included in a wildcard resume instead. */
if (info.step || info.sig != GDB_SIGNAL_0
|| !get_remote_inferior (tp->inf)->may_wildcard_vcont)
vcont_builder.push_action (tp->ptid, info.step, info.sig);
continue;
/* Need to switch to a specific thread, because remote_check_symbols will
- set the general thread using INFERIOR_PTID.
+ set the general thread using INFERIOR_PTID.
It's possible to have inferiors with no thread here, because we are
called very early in the connection process, while the inferior is
if (tdesc != nullptr)
{
const struct tdesc_feature *feature_csr
- = tdesc_find_feature (tdesc, riscv_feature_name_csr);
+ = tdesc_find_feature (tdesc, riscv_feature_name_csr);
if (feature_csr != nullptr && feature_csr->registers.size () > 0)
{
riscv_update_csrmap (gdbarch, feature_csr);
tid64_t thrd_i = 0;
if (getthrds64(pid, &thrdentry, sizeof(struct thrdentry64),
- &thrd_i, 1) == 1)
+ &thrd_i, 1) == 1)
thrd_i = thrdentry.ti_tid;
memset(&vsx, 0, sizeof(__vsx_context_t));
tid64_t thrd_i = 0;
if (getthrds64(pid, &thrdentry, sizeof(struct thrdentry64),
- &thrd_i, 1) == 1)
+ &thrd_i, 1) == 1)
thrd_i = thrdentry.ti_tid;
memset(&vmx, 0, sizeof(__vmx_context_t));
for (i = 0; i < num_of_vrregs; i++)
regcache->raw_supply (tdep->ppc_vr0_regnum + i,
- &(vmx->__vr[i]));
+ &(vmx->__vr[i]));
regcache->raw_supply (tdep->ppc_vrsave_regnum, &(vmx->__vrsave));
regcache->raw_supply (tdep->ppc_vrsave_regnum - 1, &(vmx->__vscr));
}
tid64_t thrd_i = 0;
if (getthrds64(pid, &thrdentry, sizeof(struct thrdentry64),
- &thrd_i, 1) == 1)
+ &thrd_i, 1) == 1)
thrd_i = thrdentry.ti_tid;
memset(&vmx, 0, sizeof(__vmx_context_t));
for (i = 0; i < ppc_num_vshrs; i++)
regcache->raw_supply (tdep->ppc_vsr0_upper_regnum + i,
- &(vsx->__vsr_dw1[i]));
+ &(vsx->__vsr_dw1[i]));
}
/* Fetch vsx registers. */
tid64_t thrd_i = 0;
if (getthrds64(pid, &thrdentry, sizeof(struct thrdentry64),
- &thrd_i, 1) == 1)
+ &thrd_i, 1) == 1)
thrd_i = thrdentry.ti_tid;
memset(&vsx, 0, sizeof(__vsx_context_t));
fetch_register (regcache, tdep->ppc_fp0_regnum + regno);
if (tdep->ppc_vr0_regnum != -1 && tdep->ppc_vrsave_regnum != -1)
- fetch_altivec_registers_aix (regcache);
+ fetch_altivec_registers_aix (regcache);
if (tdep->ppc_vsr0_upper_regnum != -1)
- fetch_vsx_registers_aix (regcache);
+ fetch_vsx_registers_aix (regcache);
/* Read special registers. */
fetch_register (regcache, gdbarch_pc_regnum (gdbarch));
static int
rs6000_aix_get_vrreg_offset (ppc_gdbarch_tdep *tdep,
const struct rs6000_aix_reg_vrreg_offset *offsets,
- int regnum)
+ int regnum)
{
if (regnum >= tdep->ppc_vr0_regnum &&
regnum < tdep->ppc_vr0_regnum + ppc_num_vrs)
static void
rs6000_aix_supply_vrregset (const struct regset *regset, struct regcache *regcache,
- int regnum, const void *vrregs, size_t len)
+ int regnum, const void *vrregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
const struct rs6000_aix_reg_vrreg_offset *offsets;
static void
rs6000_aix_supply_vsxregset (const struct regset *regset, struct regcache *regcache,
- int regnum, const void *vsxregs, size_t len)
+ int regnum, const void *vsxregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
static void
rs6000_aix_collect_vsxregset (const struct regset *regset,
- const struct regcache *regcache,
- int regnum, void *vsxregs, size_t len)
+ const struct regcache *regcache,
+ int regnum, void *vsxregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
ppc_gdbarch_tdep *tdep = gdbarch_tdep<ppc_gdbarch_tdep> (gdbarch);
return;
}
-
- else
+ else
ppc_collect_reg (regcache, regnum, (gdb_byte *) vsxregs, 0, 8);
}
static void
rs6000_aix_collect_vrregset (const struct regset *regset,
- const struct regcache *regcache,
- int regnum, void *vrregs, size_t len)
+ const struct regcache *regcache,
+ int regnum, void *vrregs, size_t len)
{
struct gdbarch *gdbarch = regcache->arch ();
const struct rs6000_aix_reg_vrreg_offset *offsets;
ppc_collect_reg (regcache, regnum, (gdb_byte *) vrregs, offset, 16);
else
ppc_collect_reg (regcache, regnum,
- (gdb_byte *) vrregs, offset, 4);
+ (gdb_byte *) vrregs, offset, 4);
}
static const struct regset rs6000_aix_vrregset = {
else
{
/* Handle any other instructions that do not fit in the categories
- above. */
+ above. */
regcache_cooked_write_unsigned (regs, gdbarch_pc_regnum (gdbarch),
from + offset);
}
entry consist of four 128-bit rows.
The ACC rows map to specific VSR registers.
- ACC[0][0] -> VSR[0]
- ACC[0][1] -> VSR[1]
- ACC[0][2] -> VSR[2]
- ACC[0][3] -> VSR[3]
- ...
- ACC[7][0] -> VSR[28]
- ACC[7][1] -> VSR[29]
- ACC[7][2] -> VSR[30]
- ACC[7][3] -> VSR[31]
+ ACC[0][0] -> VSR[0]
+ ACC[0][1] -> VSR[1]
+ ACC[0][2] -> VSR[2]
+ ACC[0][3] -> VSR[3]
+ ...
+ ACC[7][0] -> VSR[28]
+ ACC[7][1] -> VSR[29]
+ ACC[7][2] -> VSR[30]
+ ACC[7][3] -> VSR[31]
NOTE:
In ISA 3.1 the ACC is mapped on top of VSR[0] thru VSR[31].
if (target_read_memory (address, target_mem, PPC_INSN_SIZE) == 0)
{
uint32_t insn = (uint32_t) extract_unsigned_integer
- (target_mem, PPC_INSN_SIZE, gdbarch_byte_order_for_code (gdbarch));
+ (target_mem, PPC_INSN_SIZE, gdbarch_byte_order_for_code (gdbarch));
/* Check if INSN is a TW, TWI, TD or TDI instruction. There
- are multiple choices of such instructions with different registers
- and / or immediate values but they all cause a break. */
+ are multiple choices of such instructions with different registers
+ and / or immediate values but they all cause a break. */
if (is_tw_insn (insn) || is_twi_insn (insn) || is_td_insn (insn)
- || is_tdi_insn (insn))
- return true;
+ || is_tdi_insn (insn))
+ return true;
}
return false;
set_gdbarch_sw_breakpoint_from_kind (gdbarch,
rs6000_breakpoint::bp_from_kind);
set_gdbarch_program_breakpoint_here_p (gdbarch,
- rs6000_program_breakpoint_here_p);
+ rs6000_program_breakpoint_here_p);
/* The value of symbols of type N_SO and N_FUN maybe null when
it shouldn't be. */
/* Arrange to pop the entire stack. */
precedence = -2;
break;
- }
+ }
/* Make sure that assignments are right-associative while other
operations are left-associative. */
self_test_foreach_arch_function *function)
{
add_lazy_generator ([=] ()
- {
- return foreach_arch_test_generator (name, function);
- });
+ { return foreach_arch_test_generator (name, function); });
}
void
return 0;
/* Get the so list from the target. We replace the list in the
- target response so we can easily check that the response only
- covers one namespace.
+ target response so we can easily check that the response only
+ covers one namespace.
We expect gdbserver to provide updates for the namespace that
contains LM, which whould be this namespace... */
libpthread_name_p (const char *name)
{
return (strstr (name, "/libpthread") != NULL
- || strstr (name, "/libc.") != NULL );
+ || strstr (name, "/libc.") != NULL );
}
/* Return non-zero if SO is the libpthread shared library. */
}
if (name[0] == '\0')
- goto skip_dup;
+ goto skip_dup;
if (name[0] == '~')
new_name_holder
= gdb::unique_xmalloc_ptr<char[]> (tilde_expand (name)).get ();
&setlist, &showlist);
add_prefix_cmd ("source", no_class, set_source,
- _("Generic command for setting how sources are handled."),
- &setsourcelist, 0, &setlist);
+ _("Generic command for setting how sources are handled."),
+ &setsourcelist, 0, &setlist);
add_prefix_cmd ("source", no_class, show_source,
- _("Generic command for showing source settings."),
- &showsourcelist, 0, &showlist);
+ _("Generic command for showing source settings."),
+ &showsourcelist, 0, &showlist);
add_setshow_boolean_cmd ("open", class_files, &source_open, _("\
Set whether GDB should open source files."), _("\
GDB will print the file and line number that would have been displayed.\n\
This can be useful if access to source code files is slow, for example\n\
due to the source being located over a slow network connection."),
- NULL,
- show_source_open,
- &setsourcelist, &showsourcelist);
+ NULL,
+ show_source_open,
+ &setsourcelist, &showsourcelist);
}
pc = saved_pc;
/* Check if the compiler explicitly indicated where a breakpoint should
- be placed to skip the prologue. */
+ be placed to skip the prologue. */
if (!ignore_prologue_end_flag && skip)
{
gdb::optional<CORE_ADDR> linetable_pc
/* See class declaration. */
info_sources_filter::info_sources_filter (match_on match_type,
- const char *regexp)
+ const char *regexp)
: m_match_type (match_type),
m_regexp (regexp)
{
std::string dirname;
switch (m_match_type)
- {
- case match_on::DIRNAME:
- dirname = ldirname (fullname);
- to_match = dirname.c_str ();
- break;
- case match_on::BASENAME:
- to_match = lbasename (fullname);
- break;
- case match_on::FULLNAME:
- to_match = fullname;
- break;
+ {
+ case match_on::DIRNAME:
+ dirname = ldirname (fullname);
+ to_match = dirname.c_str ();
+ break;
+ case match_on::BASENAME:
+ to_match = lbasename (fullname);
+ break;
+ case match_on::FULLNAME:
+ to_match = fullname;
+ break;
default:
gdb_assert_not_reached ("bad m_match_type");
- }
+ }
if (m_c_regexp->exec (to_match, 0, NULL, 0) != 0)
- return false;
+ return false;
}
return true;
if (filter_ptid == minus_one_ptid)
{
/* Iterate on all threads of all inferiors, possibly filtering on
- FILTER_TARGET. */
+ FILTER_TARGET. */
m_mode = mode::ALL_THREADS;
/* Seek the first thread of the first matching inferior. */
process_stratum_target *proc_target = tp->inf->process_target ();
/* Some targets unpush themselves from the inferior's target stack before
- clearing the inferior's thread list (which marks all threads as exited,
- and therefore leads to this function). In this case, the inferior's
- process target will be nullptr when we arrive here.
+ clearing the inferior's thread list (which marks all threads as exited,
+ and therefore leads to this function). In this case, the inferior's
+ process target will be nullptr when we arrive here.
- See also the comment in inferior::unpush_target. */
+ See also the comment in inferior::unpush_target. */
if (proc_target != nullptr)
proc_target->maybe_remove_resumed_with_pending_wait_status (tp);
subcommands. */
{
std::string prefixname = c->prefixname ();
- std::string prefixname_no_space
+ std::string prefixname_no_space
= prefixname.substr (0, prefixname.length () - 1);
gdb_printf
("\"%s\" must be followed by the name of a subcommand.\n",
{
/* Save the old cmd window information, in case we need to
restore it later. */
- old_cmd_info.emplace (i, info[i].min_size, info[i].max_size);
+ old_cmd_info.emplace (i, info[i].min_size, info[i].max_size);
/* If this layout has never been applied, then it means the
user just changed the layout. In this situation, it's
window non-fixed-size (if possible), and hope we can
shrink this enough to fit the rest of the sub-layouts in.
- Alternatively, we've made it around the loop without
- adjusting any window's size. This likely means all
- windows have hit their min or max size. Again, our only
- hope is to make the cmd window non-fixed-size, and hope
- this fixes all our problems. */
+ Alternatively, we've made it around the loop without
+ adjusting any window's size. This likely means all
+ windows have hit their min or max size. Again, our only
+ hope is to make the cmd window non-fixed-size, and hope
+ this fixes all our problems. */
if (old_cmd_info.has_value ()
&& ((available_size < used_size)
|| !found_window_that_can_grow_p))
/T print typedefs defined in a class\n\
/o print offsets and sizes of fields in a struct (like pahole)\n\
/x use hexadecimal notation when displaying sizes and offsets\n\
- of struct members\n\
+ of struct members\n\
/d use decimal notation when displaying sizes and offsets\n\
- of struct members "));
+ of struct members "));
set_cmd_completer (c, expression_completer);
c = add_com ("whatis", class_vars, whatis_command,
does not exist, gdb_tilde expand must still be able to do the tilde
expansion. */
SELF_CHECK (gdb_tilde_expand ("~/non/existent/directory")
- == home + "/non/existent/directory");
+ == home + "/non/existent/directory");
/* gdb_tilde_expand only expands tilde and does not try to do any other
substitution. */
const std::string user (c_user);
SELF_CHECK (gdb_tilde_expand (("~" + user).c_str ()) == home);
SELF_CHECK (gdb_tilde_expand (("~" + user + "/a/b").c_str ())
- == home + "/a/b");
+ == home + "/a/b");
}
/* Check that an error is thrown when trying to expand home of a unknown
{
SELF_CHECK (e.error == GENERIC_ERROR);
SELF_CHECK
- (*e.message
- == "Could not find a match for '~no_one_should_have_that_login'.");
+ (*e.message
+ == "Could not find a match for '~no_one_should_have_that_login'.");
}
}
By changing the type of the component to lval_memory we ensure
that value_fetch_lazy can successfully load the component.
- This solution isn't ideal, but a real fix would require values to
- carry around both the parent value contents, and the contents of
- any dynamic fields within the parent. This is a substantial
- change to how values work in GDB. */
+ This solution isn't ideal, but a real fix would require values to
+ carry around both the parent value contents, and the contents of
+ any dynamic fields within the parent. This is a substantial
+ change to how values work in GDB. */
if (this->lval () == lval_internalvar_component)
{
gdb_assert (lazy ());
byte_order = gdbarch_byte_order (gdbarch);
cache_novly_regions = read_memory_integer (novly_regions_msym.value_address (),
- 4, byte_order);
+ 4, byte_order);
cache_ovly_region_table
= (unsigned int (*)[3]) xmalloc (cache_novly_regions *
sizeof (*cache_ovly_region_table));
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_chid->waitstatus wasn't filled in with the details, so look at
the wait status W. */
if (WSTOPSIG (w) == SYSCALL_SIGTRAP)
{
#define FILEIO_S_IRWXO 07
#define FILEIO_S_SUPPORTED (FILEIO_S_IFREG|FILEIO_S_IFDIR| \
FILEIO_S_IRWXU|FILEIO_S_IRWXG| \
- FILEIO_S_IRWXO)
+ FILEIO_S_IRWXO)
/* lseek(2) flags */
#define FILEIO_SEEK_SET 0
gdb_assert (n < chunk_size);
/* Less than CHUNK means EOF or error. If it's an error, return
- no value. */
+ no value. */
if (ferror (file.get ()))
return {};
/* Look for the first dir separator (if any) and split d around it. */
const auto first_sep
= std::find_if (d.cbegin (), d.cend(),
- [] (const char c) -> bool
- {
- return IS_DIR_SEPARATOR (c);
- });
+ [] (const char c) -> bool
+ { return IS_DIR_SEPARATOR (c); });
const std::string to_expand (d.cbegin (), first_sep);
const std::string remainder (first_sep, d.cend ());
for (const token *dep : m_observers[index].dependencies)
{
/* ... find the observer that has token DEP. If found, visit it. */
- auto it_dep
- = std::find_if (m_observers.begin (), m_observers.end (),
- [&] (observer o) { return o.token == dep; });
- if (it_dep != m_observers.end ())
- {
- int i = std::distance (m_observers.begin (), it_dep);
- visit_for_sorting (sorted_observers, visit_states, i);
- }
+ auto it_dep
+ = std::find_if (m_observers.begin (), m_observers.end (),
+ [&] (observer o) { return o.token == dep; });
+ if (it_dep != m_observers.end ())
+ {
+ int i = std::distance (m_observers.begin (), it_dep);
+ visit_for_sorting (sorted_observers, visit_states, i);
+ }
}
visit_states[index] = detail::visit_state::VISITED;
}
void attach (const func_type &f, const token *t, const char *name,
- const std::vector<const struct token *> &dependencies)
+ const std::vector<const struct token *> &dependencies)
{
observer_debug_printf ("Attaching observable %s to observer %s",
- name, m_name);
+ name, m_name);
m_observers.emplace_back (t, f, name, dependencies);
debug_printf (_("\n"));
}
results.post (i, [=] ()
- {
- return callback (first, end);
- });
+ { return callback (first, end); });
first = end;
}