2011-01-08 Michael Snyder <msnyder@vmware.com>
* h8300-tdep.c: Comment cleanup, mostly periods and spaces. * hppa-hpux-tdep.c: Ditto. * hppa-linux-nat.c: Ditto. * hppa-linux-tdep.c: Ditto. * hppanbsd-tdep.c: Ditto. * hppa-tdep.c: Ditto. * hppa-tdep.h: Ditto. * hpux-thread.c: Ditto. * i386-cygwin-tdep.c: Ditto. * i386-darwin-nat.c: Ditto. * i386gnu-nat.c: Ditto. * i386-linux-nat.c: Ditto. * i386-linux-tdep.c: Ditto. * i386-nat.c: Ditto. * i386-nat.h: Ditto. * i386nbsd-tdep.c: Ditto. * i386-sol2-nat.c: Ditto. * i386-stub.c: Ditto. * i386-tdep.c: Ditto. * i386-tdep.h: Ditto. * i387-tdep.c: Ditto. * ia64-linux-nat.c: Ditto. * ia64-linux-tdep.c: Ditto. * ia64-tdep.c: Ditto. * infcall.c: Ditto. * infcall.h: Ditto. * infcmd.c: Ditto. * inferior.c: Ditto. * inferior.h: Ditto. * infloop.c: Ditto. * inflow.c: Ditto. * infrun.c: Ditto. * interps.c: Ditto. * interps.h: Ditto. * iq2000-tdep.c: Ditto. * irix5-nat.c: Ditto. * jit.c: Ditto. * jit.h: Ditto. * jv-exp.y: Ditto. * jv-lang.c: Ditto. * jv-lang.h: Ditto. * jv-typeprint.c: Ditto. * jv-valprint.c: Ditto. * language.c: Ditto. * language.h: Ditto. * linespec.c: Ditto. * linux-fork.c: Ditto. * linux-nat.c: Ditto. * linux-thread-db.c: Ditto. * lm32-tdep.c: Ditto.
This commit is contained in:
parent
0cb2acab06
commit
1777feb0fe
@ -1,3 +1,56 @@
|
||||
2011-01-08 Michael Snyder <msnyder@vmware.com>
|
||||
|
||||
* h8300-tdep.c: Comment cleanup, mostly periods and spaces.
|
||||
* hppa-hpux-tdep.c: Ditto.
|
||||
* hppa-linux-nat.c: Ditto.
|
||||
* hppa-linux-tdep.c: Ditto.
|
||||
* hppanbsd-tdep.c: Ditto.
|
||||
* hppa-tdep.c: Ditto.
|
||||
* hppa-tdep.h: Ditto.
|
||||
* hpux-thread.c: Ditto.
|
||||
* i386-cygwin-tdep.c: Ditto.
|
||||
* i386-darwin-nat.c: Ditto.
|
||||
* i386gnu-nat.c: Ditto.
|
||||
* i386-linux-nat.c: Ditto.
|
||||
* i386-linux-tdep.c: Ditto.
|
||||
* i386-nat.c: Ditto.
|
||||
* i386-nat.h: Ditto.
|
||||
* i386nbsd-tdep.c: Ditto.
|
||||
* i386-sol2-nat.c: Ditto.
|
||||
* i386-stub.c: Ditto.
|
||||
* i386-tdep.c: Ditto.
|
||||
* i386-tdep.h: Ditto.
|
||||
* i387-tdep.c: Ditto.
|
||||
* ia64-linux-nat.c: Ditto.
|
||||
* ia64-linux-tdep.c: Ditto.
|
||||
* ia64-tdep.c: Ditto.
|
||||
* infcall.c: Ditto.
|
||||
* infcall.h: Ditto.
|
||||
* infcmd.c: Ditto.
|
||||
* inferior.c: Ditto.
|
||||
* inferior.h: Ditto.
|
||||
* infloop.c: Ditto.
|
||||
* inflow.c: Ditto.
|
||||
* infrun.c: Ditto.
|
||||
* interps.c: Ditto.
|
||||
* interps.h: Ditto.
|
||||
* iq2000-tdep.c: Ditto.
|
||||
* irix5-nat.c: Ditto.
|
||||
* jit.c: Ditto.
|
||||
* jit.h: Ditto.
|
||||
* jv-exp.y: Ditto.
|
||||
* jv-lang.c: Ditto.
|
||||
* jv-lang.h: Ditto.
|
||||
* jv-typeprint.c: Ditto.
|
||||
* jv-valprint.c: Ditto.
|
||||
* language.c: Ditto.
|
||||
* language.h: Ditto.
|
||||
* linespec.c: Ditto.
|
||||
* linux-fork.c: Ditto.
|
||||
* linux-nat.c: Ditto.
|
||||
* linux-thread-db.c: Ditto.
|
||||
* lm32-tdep.c: Ditto.
|
||||
|
||||
2011-01-08 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* bfin-tdep.h (BFIN_A0_DOT_W_REGNUM): Fix typo in name.
|
||||
|
@ -147,7 +147,7 @@ h8300_init_frame_cache (struct gdbarch *gdbarch,
|
||||
#define IS_MOVW_Rn16_SP(x) (((x) & 0xfff0) == 0x6fe0)
|
||||
#define IS_MOVW_EXT(x) ((x) == 0x78e0)
|
||||
#define IS_MOVW_Rn24_SP(x) (((x) & 0xfff0) == 0x6ba0)
|
||||
/* Same instructions as mov.w, just prefixed with 0x0100 */
|
||||
/* Same instructions as mov.w, just prefixed with 0x0100. */
|
||||
#define IS_MOVL_PRE(x) ((x) == 0x0100)
|
||||
#define IS_MOVL_Rn16_SP(x) (((x) & 0xfff0) == 0x6fe0)
|
||||
#define IS_MOVL_EXT(x) ((x) == 0x78e0)
|
||||
@ -866,8 +866,9 @@ h8300_store_return_value (struct type *type, struct regcache *regcache,
|
||||
(val >> 16) & 0xffff);
|
||||
regcache_cooked_write_unsigned (regcache, E_RET1_REGNUM, val & 0xffff);
|
||||
break;
|
||||
case 8: /* long long, double and long double are all defined
|
||||
as 4 byte types so far so this shouldn't happen. */
|
||||
case 8: /* long long, double and long double
|
||||
are all defined as 4 byte types so
|
||||
far so this shouldn't happen. */
|
||||
error ("I don't know how to return an 8 byte value.");
|
||||
break;
|
||||
}
|
||||
|
@ -325,7 +325,8 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
the PLT entry for this function, not the address of the function
|
||||
itself. Bit 31 has meaning too, but only for MPE. */
|
||||
if (pc & 0x2)
|
||||
pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, word_size, byte_order);
|
||||
pc = (CORE_ADDR) read_memory_integer (pc & ~0x3, word_size,
|
||||
byte_order);
|
||||
}
|
||||
if (pc == hppa_symbol_address("$$dyncall_external"))
|
||||
{
|
||||
@ -351,10 +352,10 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
partial symbol information is also wrong sometimes. This is because
|
||||
when it is entered (somread.c::som_symtab_read()) it can happen that
|
||||
if the type of the symbol (from the som) is Entry, and the symbol is
|
||||
in a shared library, then it can also be a trampoline. This would
|
||||
be OK, except that I believe the way they decide if we are ina shared library
|
||||
does not work. SOOOO..., even if we have a regular function w/o trampolines
|
||||
its minimal symbol can be assigned type mst_solib_trampoline.
|
||||
in a shared library, then it can also be a trampoline. This would be OK,
|
||||
except that I believe the way they decide if we are ina shared library
|
||||
does not work. SOOOO..., even if we have a regular function w/o
|
||||
trampolines its minimal symbol can be assigned type mst_solib_trampoline.
|
||||
Also, if we find that the symbol is a real stub, then we fix the unwind
|
||||
descriptor, and define the stub type to be EXPORT.
|
||||
Hopefully this is correct most of the times. */
|
||||
@ -362,7 +363,7 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
{
|
||||
|
||||
/* elz: NOTE (FIXME!) once the problem with the unwind information is fixed
|
||||
we can delete all the code which appears between the lines */
|
||||
we can delete all the code which appears between the lines. */
|
||||
/*--------------------------------------------------------------------------*/
|
||||
msym = lookup_minimal_symbol_by_pc (pc);
|
||||
|
||||
@ -375,10 +376,10 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
struct minimal_symbol *msymbol;
|
||||
int function_found = 0;
|
||||
|
||||
/* go look if there is another minimal symbol with the same name as
|
||||
/* Go look if there is another minimal symbol with the same name as
|
||||
this one, but with type mst_text. This would happen if the msym
|
||||
is an actual trampoline, in which case there would be another
|
||||
symbol with the same name corresponding to the real function */
|
||||
symbol with the same name corresponding to the real function. */
|
||||
|
||||
ALL_MSYMBOLS (objfile, msymbol)
|
||||
{
|
||||
@ -392,14 +393,14 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
}
|
||||
|
||||
if (function_found)
|
||||
/* the type of msym is correct (mst_solib_trampoline), but
|
||||
the unwind info is wrong, so set it to the correct value */
|
||||
/* The type of msym is correct (mst_solib_trampoline), but
|
||||
the unwind info is wrong, so set it to the correct value. */
|
||||
u->stub_unwind.stub_type = EXPORT;
|
||||
else
|
||||
/* the stub type info in the unwind is correct (this is not a
|
||||
/* The stub type info in the unwind is correct (this is not a
|
||||
trampoline), but the msym type information is wrong, it
|
||||
should be mst_text. So we need to fix the msym, and also
|
||||
get out of this function */
|
||||
get out of this function. */
|
||||
{
|
||||
MSYMBOL_TYPE (msym) = mst_text;
|
||||
return orig_pc == pc ? 0 : pc & ~0x3;
|
||||
@ -436,10 +437,12 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
/* Yup. See if the previous instruction loaded
|
||||
a value into %r1. If so compute and return the jump address. */
|
||||
if ((prev_inst & 0xffe00000) == 0x20200000)
|
||||
return (hppa_extract_21 (prev_inst) + hppa_extract_17 (curr_inst)) & ~0x3;
|
||||
return (hppa_extract_21 (prev_inst)
|
||||
+ hppa_extract_17 (curr_inst)) & ~0x3;
|
||||
else
|
||||
{
|
||||
warning (_("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1)."));
|
||||
warning (_("Unable to find ldil X,%%r1 "
|
||||
"before ble Y(%%sr4,%%r1)."));
|
||||
return orig_pc == pc ? 0 : pc & ~0x3;
|
||||
}
|
||||
}
|
||||
@ -479,7 +482,8 @@ hppa_hpux_skip_trampoline_code (struct frame_info *frame, CORE_ADDR pc)
|
||||
return orig_pc == pc ? 0 : pc & ~0x3;
|
||||
}
|
||||
|
||||
libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym), NULL, NULL);
|
||||
libsym = lookup_minimal_symbol (SYMBOL_LINKAGE_NAME (stubsym),
|
||||
NULL, NULL);
|
||||
if (libsym == NULL)
|
||||
{
|
||||
warning (_("Unable to find library symbol for %s."),
|
||||
@ -574,7 +578,8 @@ hppa_skip_permanent_breakpoint (struct regcache *regcache)
|
||||
regcache_cooked_write_unsigned (regcache, HPPA_PCOQ_HEAD_REGNUM, pcoq_tail);
|
||||
regcache_cooked_write_unsigned (regcache, HPPA_PCSQ_HEAD_REGNUM, pcsq_tail);
|
||||
|
||||
regcache_cooked_write_unsigned (regcache, HPPA_PCOQ_TAIL_REGNUM, pcoq_tail + 4);
|
||||
regcache_cooked_write_unsigned (regcache,
|
||||
HPPA_PCOQ_TAIL_REGNUM, pcoq_tail + 4);
|
||||
/* We can leave the tail's space the same, since there's no jump. */
|
||||
}
|
||||
|
||||
@ -647,8 +652,8 @@ hppa_hpux_sigtramp_frame_unwind_cache (struct frame_info *this_frame,
|
||||
|
||||
off = scptr;
|
||||
|
||||
/* See /usr/include/machine/save_state.h for the structure of the save_state_t
|
||||
structure. */
|
||||
/* See /usr/include/machine/save_state.h for the structure of the
|
||||
save_state_t structure. */
|
||||
|
||||
flag = read_memory_unsigned_integer (scptr + HPPA_HPUX_SS_FLAGS_OFFSET,
|
||||
4, byte_order);
|
||||
@ -708,7 +713,8 @@ hppa_hpux_sigtramp_frame_prev_register (struct frame_info *this_frame,
|
||||
struct hppa_hpux_sigtramp_unwind_cache *info
|
||||
= hppa_hpux_sigtramp_frame_unwind_cache (this_frame, this_prologue_cache);
|
||||
|
||||
return hppa_frame_prev_register_helper (this_frame, info->saved_regs, regnum);
|
||||
return hppa_frame_prev_register_helper (this_frame,
|
||||
info->saved_regs, regnum);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1087,7 +1093,7 @@ hppa_hpux_find_dummy_bpaddr (CORE_ADDR addr)
|
||||
if (sec)
|
||||
{
|
||||
/* First try the lowest address in the section; we can use it as long
|
||||
as it is "regular" code (i.e. not a stub) */
|
||||
as it is "regular" code (i.e. not a stub). */
|
||||
u = find_unwind_entry (obj_section_addr (sec));
|
||||
if (!u || u->stub_unwind.stub_type == 0)
|
||||
return obj_section_addr (sec);
|
||||
@ -1195,9 +1201,7 @@ hppa_hpux_push_dummy_code (struct gdbarch *gdbarch, CORE_ADDR sp,
|
||||
- point the sequence at the trampoline
|
||||
- set the return address of the trampoline to the current space
|
||||
(see hppa_hpux_find_dummy_call_bpaddr)
|
||||
- set the continuing address of the "dummy code" as the sequence.
|
||||
|
||||
*/
|
||||
- set the continuing address of the "dummy code" as the sequence. */
|
||||
|
||||
if (IS_32BIT_TARGET (gdbarch))
|
||||
{
|
||||
|
@ -56,7 +56,8 @@ hppa_linux_target_write_pc (struct regcache *regcache, CORE_ADDR v)
|
||||
{
|
||||
/* Probably this should be done by the kernel, but it isn't. */
|
||||
regcache_cooked_write_unsigned (regcache, HPPA_PCOQ_HEAD_REGNUM, v | 0x3);
|
||||
regcache_cooked_write_unsigned (regcache, HPPA_PCOQ_TAIL_REGNUM, (v + 4) | 0x3);
|
||||
regcache_cooked_write_unsigned (regcache,
|
||||
HPPA_PCOQ_TAIL_REGNUM, (v + 4) | 0x3);
|
||||
}
|
||||
|
||||
/* An instruction to match. */
|
||||
@ -330,7 +331,8 @@ static const struct frame_unwind hppa_linux_sigtramp_frame_unwind = {
|
||||
d_un.d_ptr value is the global pointer. */
|
||||
|
||||
static CORE_ADDR
|
||||
hppa_linux_find_global_pointer (struct gdbarch *gdbarch, struct value *function)
|
||||
hppa_linux_find_global_pointer (struct gdbarch *gdbarch,
|
||||
struct value *function)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
struct obj_section *faddr_sect;
|
||||
@ -562,6 +564,8 @@ hppa_linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
|
||||
void
|
||||
_initialize_hppa_linux_tdep (void)
|
||||
{
|
||||
gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_LINUX, hppa_linux_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_hppa, bfd_mach_hppa20w, GDB_OSABI_LINUX, hppa_linux_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_hppa, 0, GDB_OSABI_LINUX,
|
||||
hppa_linux_init_abi);
|
||||
gdbarch_register_osabi (bfd_arch_hppa, bfd_mach_hppa20w,
|
||||
GDB_OSABI_LINUX, hppa_linux_init_abi);
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "osabi.h"
|
||||
#include "gdb_assert.h"
|
||||
#include "arch-utils.h"
|
||||
/* For argument passing to the inferior */
|
||||
/* For argument passing to the inferior. */
|
||||
#include "symtab.h"
|
||||
#include "dis-asm.h"
|
||||
#include "trad-frame.h"
|
||||
@ -96,7 +96,7 @@ hppa_get_field (unsigned word, int from, int to)
|
||||
return ((word) >> (31 - (to)) & ((1 << ((to) - (from) + 1)) - 1));
|
||||
}
|
||||
|
||||
/* extract the immediate field from a ld{bhw}s instruction */
|
||||
/* Extract the immediate field from a ld{bhw}s instruction. */
|
||||
|
||||
int
|
||||
hppa_extract_5_load (unsigned word)
|
||||
@ -104,7 +104,7 @@ hppa_extract_5_load (unsigned word)
|
||||
return hppa_low_hppa_sign_extend (word >> 16 & MASK_5, 5);
|
||||
}
|
||||
|
||||
/* extract the immediate field from a break instruction */
|
||||
/* Extract the immediate field from a break instruction. */
|
||||
|
||||
unsigned
|
||||
hppa_extract_5r_store (unsigned word)
|
||||
@ -112,7 +112,7 @@ hppa_extract_5r_store (unsigned word)
|
||||
return (word & MASK_5);
|
||||
}
|
||||
|
||||
/* extract the immediate field from a {sr}sm instruction */
|
||||
/* Extract the immediate field from a {sr}sm instruction. */
|
||||
|
||||
unsigned
|
||||
hppa_extract_5R_store (unsigned word)
|
||||
@ -120,7 +120,7 @@ hppa_extract_5R_store (unsigned word)
|
||||
return (word >> 16 & MASK_5);
|
||||
}
|
||||
|
||||
/* extract a 14 bit immediate field */
|
||||
/* Extract a 14 bit immediate field. */
|
||||
|
||||
int
|
||||
hppa_extract_14 (unsigned word)
|
||||
@ -128,7 +128,7 @@ hppa_extract_14 (unsigned word)
|
||||
return hppa_low_hppa_sign_extend (word & MASK_14, 14);
|
||||
}
|
||||
|
||||
/* extract a 21 bit constant */
|
||||
/* Extract a 21 bit constant. */
|
||||
|
||||
int
|
||||
hppa_extract_21 (unsigned word)
|
||||
@ -222,8 +222,8 @@ record_text_segment_lowaddr (bfd *abfd, asection *section, void *data)
|
||||
|
||||
static void
|
||||
internalize_unwinds (struct objfile *objfile, struct unwind_table_entry *table,
|
||||
asection *section, unsigned int entries, unsigned int size,
|
||||
CORE_ADDR text_offset)
|
||||
asection *section, unsigned int entries,
|
||||
unsigned int size, CORE_ADDR text_offset)
|
||||
{
|
||||
/* We will read the unwind entries into temporary memory, then
|
||||
fill in the actual unwind table. */
|
||||
@ -489,7 +489,7 @@ find_unwind_entry (CORE_ADDR pc)
|
||||
ui = ((struct hppa_objfile_private *) priv)->unwind_info;
|
||||
}
|
||||
|
||||
/* First, check the cache */
|
||||
/* First, check the cache. */
|
||||
|
||||
if (ui->cache
|
||||
&& pc >= ui->cache->region_start
|
||||
@ -501,7 +501,7 @@ find_unwind_entry (CORE_ADDR pc)
|
||||
return ui->cache;
|
||||
}
|
||||
|
||||
/* Not in the cache, do a binary search */
|
||||
/* Not in the cache, do a binary search. */
|
||||
|
||||
first = 0;
|
||||
last = ui->last;
|
||||
@ -829,7 +829,7 @@ hppa32_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
}
|
||||
|
||||
/* If a structure has to be returned, set up register 28 to hold its
|
||||
address */
|
||||
address. */
|
||||
if (struct_return)
|
||||
regcache_cooked_write_unsigned (regcache, 28, struct_addr);
|
||||
|
||||
@ -1424,12 +1424,12 @@ inst_saves_gr (unsigned long inst)
|
||||
static int
|
||||
inst_saves_fr (unsigned long inst)
|
||||
{
|
||||
/* is this an FSTD ? */
|
||||
/* Is this an FSTD? */
|
||||
if ((inst & 0xfc00dfc0) == 0x2c001200)
|
||||
return hppa_extract_5r_store (inst);
|
||||
if ((inst & 0xfc000002) == 0x70000002)
|
||||
return hppa_extract_5R_store (inst);
|
||||
/* is this an FSTW ? */
|
||||
/* Is this an FSTW? */
|
||||
if ((inst & 0xfc00df80) == 0x24001200)
|
||||
return hppa_extract_5r_store (inst);
|
||||
if ((inst & 0xfc000002) == 0x7c000000)
|
||||
@ -1971,7 +1971,8 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
CORE_ADDR offset;
|
||||
|
||||
if ((inst >> 26) == 0x1c)
|
||||
offset = (inst & 0x1 ? -1 << 13 : 0) | (((inst >> 4) & 0x3ff) << 3);
|
||||
offset = (inst & 0x1 ? -1 << 13 : 0)
|
||||
| (((inst >> 4) & 0x3ff) << 3);
|
||||
else if ((inst >> 26) == 0x03)
|
||||
offset = hppa_low_hppa_sign_extend (inst & 0x1f, 5);
|
||||
else
|
||||
@ -1981,7 +1982,8 @@ hppa_frame_cache (struct frame_info *this_frame, void **this_cache)
|
||||
if (u->Save_SP)
|
||||
cache->saved_regs[reg].addr = offset;
|
||||
else
|
||||
cache->saved_regs[reg].addr = (u->Total_frame_size << 3) + offset;
|
||||
cache->saved_regs[reg].addr
|
||||
= (u->Total_frame_size << 3) + offset;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2206,7 +2208,8 @@ hppa_frame_prev_register (struct frame_info *this_frame,
|
||||
{
|
||||
struct hppa_frame_cache *info = hppa_frame_cache (this_frame, this_cache);
|
||||
|
||||
return hppa_frame_prev_register_helper (this_frame, info->saved_regs, regnum);
|
||||
return hppa_frame_prev_register_helper (this_frame,
|
||||
info->saved_regs, regnum);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -2322,10 +2325,11 @@ static struct value *
|
||||
hppa_fallback_frame_prev_register (struct frame_info *this_frame,
|
||||
void **this_cache, int regnum)
|
||||
{
|
||||
struct hppa_frame_cache *info =
|
||||
hppa_fallback_frame_cache (this_frame, this_cache);
|
||||
struct hppa_frame_cache *info
|
||||
= hppa_fallback_frame_cache (this_frame, this_cache);
|
||||
|
||||
return hppa_frame_prev_register_helper (this_frame, info->saved_regs, regnum);
|
||||
return hppa_frame_prev_register_helper (this_frame,
|
||||
info->saved_regs, regnum);
|
||||
}
|
||||
|
||||
static const struct frame_unwind hppa_fallback_frame_unwind =
|
||||
@ -2404,7 +2408,8 @@ hppa_stub_frame_prev_register (struct frame_info *this_frame,
|
||||
if (info == NULL)
|
||||
error (_("Requesting registers from null frame."));
|
||||
|
||||
return hppa_frame_prev_register_helper (this_frame, info->saved_regs, regnum);
|
||||
return hppa_frame_prev_register_helper (this_frame,
|
||||
info->saved_regs, regnum);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -59,7 +59,8 @@ enum hppa_regnum
|
||||
HPPA_CCR_REGNUM = 54, /* Coprocessor Configuration Register */
|
||||
HPPA_TR0_REGNUM = 57, /* Temporary Registers (cr24 -> cr31) */
|
||||
HPPA_CR26_REGNUM = 59,
|
||||
HPPA_CR27_REGNUM = 60, /* Base register for thread-local storage, cr27 */
|
||||
HPPA_CR27_REGNUM = 60, /* Base register for thread-local
|
||||
storage, cr27 */
|
||||
HPPA_FP0_REGNUM = 64, /* First floating-point. */
|
||||
HPPA_FP4_REGNUM = 72,
|
||||
HPPA64_FP4_REGNUM = 68,
|
||||
@ -155,8 +156,8 @@ struct unwind_table_entry
|
||||
|
||||
/* This is *NOT* part of an actual unwind_descriptor in an object
|
||||
file. It is *ONLY* part of the "internalized" descriptors that
|
||||
we create from those in a file.
|
||||
*/
|
||||
we create from those in a file. */
|
||||
|
||||
struct
|
||||
{
|
||||
unsigned int stub_type:4; /* 0..3 */
|
||||
|
@ -164,7 +164,8 @@ static int hppanbsd_reg_offset[] =
|
||||
REGCACHE. If REGNUM is -1, do this for all registers in REGSET. */
|
||||
|
||||
static void
|
||||
hppanbsd_supply_gregset (const struct regset *regset, struct regcache *regcache,
|
||||
hppanbsd_supply_gregset (const struct regset *regset,
|
||||
struct regcache *regcache,
|
||||
int regnum, const void *gregs, size_t len)
|
||||
{
|
||||
const gdb_byte *regs = gregs;
|
||||
|
@ -24,12 +24,10 @@
|
||||
provide access to the HPUX user-mode thread implementation.
|
||||
|
||||
HPUX threads are true user-mode threads, which are invoked via the cma_*
|
||||
and pthread_* (DCE and Posix respectivly) interfaces. These are mostly
|
||||
and pthread_* (DCE and Posix respectively) interfaces. These are mostly
|
||||
implemented in user-space, with all thread context kept in various
|
||||
structures that live in the user's heap. For the most part, the kernel has
|
||||
no knowlege of these threads.
|
||||
|
||||
*/
|
||||
no knowlege of these threads. */
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
@ -114,7 +112,8 @@ find_tcb (ptid_t ptid)
|
||||
|
||||
tcb_ptr = cma__base (queue_ptr, threads, cma__t_int_tcb);
|
||||
|
||||
read_memory ((CORE_ADDR) tcb_ptr, (char *) &cached_tcb, sizeof cached_tcb);
|
||||
read_memory ((CORE_ADDR) tcb_ptr, (char *) &cached_tcb,
|
||||
sizeof cached_tcb);
|
||||
|
||||
if (cached_tcb.header.type == cma__c_obj_tcb)
|
||||
if (cma_thread_get_unique (&cached_tcb.prolog.client_thread) == thread)
|
||||
@ -189,8 +188,8 @@ hpux_thread_resume (struct target_ops *ops,
|
||||
to a LWP id, and vice versa on the way out. */
|
||||
|
||||
static ptid_t
|
||||
hpux_thread_wait (struct target_ops *ops,
|
||||
ptid_t ptid, struct target_waitstatus *ourstatus, int options)
|
||||
hpux_thread_wait (struct target_ops *ops, ptid_t ptid,
|
||||
struct target_waitstatus *ourstatus, int options)
|
||||
{
|
||||
ptid_t rtnval;
|
||||
struct cleanup *old_chain;
|
||||
@ -289,7 +288,7 @@ hpux_thread_fetch_registers (struct target_ops *ops,
|
||||
sp = (CORE_ADDR) tcb_ptr->static_ctx.sp - 160;
|
||||
|
||||
if (regno == HPPA_FLAGS_REGNUM)
|
||||
/* Flags must be 0 to avoid bogus value for SS_INSYSCALL */
|
||||
/* Flags must be 0 to avoid bogus value for SS_INSYSCALL. */
|
||||
memset (buf, '\000', register_size (gdbarch, regno));
|
||||
else if (regno == HPPA_SP_REGNUM)
|
||||
store_unsigned_integer (buf, sizeof sp, byte_order, sp);
|
||||
@ -411,7 +410,8 @@ hpux_thread_xfer_memory (CORE_ADDR memaddr, char *myaddr, int len,
|
||||
inferior_ptid = main_ptid;
|
||||
|
||||
retval =
|
||||
deprecated_child_ops.deprecated_xfer_memory (memaddr, myaddr, len, dowrite, attribs, target);
|
||||
deprecated_child_ops.deprecated_xfer_memory (memaddr, myaddr, len,
|
||||
dowrite, attribs, target);
|
||||
|
||||
do_cleanups (old_chain);
|
||||
|
||||
@ -501,7 +501,8 @@ hpux_thread_mourn_inferior (void)
|
||||
deprecated_child_ops.to_mourn_inferior (&deprecated_child_ops);
|
||||
}
|
||||
|
||||
/* Mark our target-struct as eligible for stray "run" and "attach" commands. */
|
||||
/* Mark our target-struct as eligible for stray "run" and "attach"
|
||||
commands. */
|
||||
|
||||
static int
|
||||
hpux_thread_can_run (void)
|
||||
|
@ -69,7 +69,9 @@ i386_darwin_fetch_inferior_registers (struct target_ops *ops,
|
||||
&gp_count);
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error calling thread_get_state for GP registers for thread 0x%ulx"), current_thread);
|
||||
printf_unfiltered (_("Error calling thread_get_state for "
|
||||
"GP registers for thread 0x%ulx"),
|
||||
current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
amd64_supply_native_gregset (regcache, &gp_regs.uts, -1);
|
||||
@ -87,7 +89,9 @@ i386_darwin_fetch_inferior_registers (struct target_ops *ops,
|
||||
&fp_count);
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error calling thread_get_state for float registers for thread 0x%ulx"), current_thread);
|
||||
printf_unfiltered (_("Error calling thread_get_state for "
|
||||
"float registers for thread 0x%ulx"),
|
||||
current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
amd64_supply_fxsave (regcache, -1, &fp_regs.ufs.fs64.__fpu_fcw);
|
||||
@ -109,7 +113,9 @@ i386_darwin_fetch_inferior_registers (struct target_ops *ops,
|
||||
&gp_count);
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error calling thread_get_state for GP registers for thread 0x%ulx"), current_thread);
|
||||
printf_unfiltered (_("Error calling thread_get_state for "
|
||||
"GP registers for thread 0x%ulx"),
|
||||
current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
for (i = 0; i < I386_NUM_GREGS; i++)
|
||||
@ -132,7 +138,9 @@ i386_darwin_fetch_inferior_registers (struct target_ops *ops,
|
||||
&fp_count);
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error calling thread_get_state for float registers for thread 0x%ulx"), current_thread);
|
||||
printf_unfiltered (_("Error calling thread_get_state for "
|
||||
"float registers for thread 0x%ulx"),
|
||||
current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
i387_supply_fxsave (regcache, -1, &fp_regs.__fpu_fcw);
|
||||
@ -293,7 +301,9 @@ i386_darwin_dr_set (int regnum, uint32_t value)
|
||||
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error reading debug registers thread 0x%x via thread_get_state\n"), (int) current_thread);
|
||||
printf_unfiltered (_("Error reading debug registers "
|
||||
"thread 0x%x via thread_get_state\n"),
|
||||
(int) current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
|
||||
@ -330,7 +340,9 @@ i386_darwin_dr_set (int regnum, uint32_t value)
|
||||
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error writing debug registers thread 0x%x via thread_get_state\n"), (int) current_thread);
|
||||
printf_unfiltered (_("Error writing debug registers "
|
||||
"thread 0x%x via thread_get_state\n"),
|
||||
(int) current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
}
|
||||
@ -355,7 +367,9 @@ i386_darwin_dr_get (int regnum)
|
||||
|
||||
if (ret != KERN_SUCCESS)
|
||||
{
|
||||
printf_unfiltered (_("Error reading debug registers thread 0x%x via thread_get_state\n"), (int) current_thread);
|
||||
printf_unfiltered (_("Error reading debug registers "
|
||||
"thread 0x%x via thread_get_state\n"),
|
||||
(int) current_thread);
|
||||
MACH_CHECK_ERROR (ret);
|
||||
}
|
||||
|
||||
@ -542,7 +556,8 @@ darwin_set_sstep (thread_t thread, int enable)
|
||||
return;
|
||||
if ((regs.uts.ts32.__eflags & X86_EFLAGS_T) == bit)
|
||||
return;
|
||||
regs.uts.ts32.__eflags = (regs.uts.ts32.__eflags & ~X86_EFLAGS_T) | bit;
|
||||
regs.uts.ts32.__eflags
|
||||
= (regs.uts.ts32.__eflags & ~X86_EFLAGS_T) | bit;
|
||||
kret = thread_set_state (thread, x86_THREAD_STATE,
|
||||
(thread_state_t) ®s, count);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
@ -557,7 +572,8 @@ darwin_set_sstep (thread_t thread, int enable)
|
||||
return;
|
||||
if ((regs.uts.ts64.__rflags & X86_EFLAGS_T) == bit)
|
||||
return;
|
||||
regs.uts.ts64.__rflags = (regs.uts.ts64.__rflags & ~X86_EFLAGS_T) | bit;
|
||||
regs.uts.ts64.__rflags
|
||||
= (regs.uts.ts64.__rflags & ~X86_EFLAGS_T) | bit;
|
||||
kret = thread_set_state (thread, x86_THREAD_STATE,
|
||||
(thread_state_t) ®s, count);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
@ -216,8 +216,8 @@ supply_gregset (struct regcache *regcache, const elf_gregset_t *gregsetp)
|
||||
|
||||
if (I386_LINUX_ORIG_EAX_REGNUM
|
||||
< gdbarch_num_regs (get_regcache_arch (regcache)))
|
||||
regcache_raw_supply (regcache, I386_LINUX_ORIG_EAX_REGNUM,
|
||||
regp + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
|
||||
regcache_raw_supply (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
|
||||
+ i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
|
||||
}
|
||||
|
||||
/* Fill register REGNO (if it is a general-purpose register) in
|
||||
@ -239,8 +239,8 @@ fill_gregset (const struct regcache *regcache,
|
||||
if ((regno == -1 || regno == I386_LINUX_ORIG_EAX_REGNUM)
|
||||
&& I386_LINUX_ORIG_EAX_REGNUM
|
||||
< gdbarch_num_regs (get_regcache_arch (regcache)))
|
||||
regcache_raw_collect (regcache, I386_LINUX_ORIG_EAX_REGNUM,
|
||||
regp + i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
|
||||
regcache_raw_collect (regcache, I386_LINUX_ORIG_EAX_REGNUM, regp
|
||||
+ i386_linux_gregset_reg_offset[I386_LINUX_ORIG_EAX_REGNUM]);
|
||||
}
|
||||
|
||||
#ifdef HAVE_PTRACE_GETREGS
|
||||
@ -352,8 +352,15 @@ store_fpregs (const struct regcache *regcache, int tid, int regno)
|
||||
|
||||
#else
|
||||
|
||||
static void fetch_fpregs (struct regcache *regcache, int tid) {}
|
||||
static void store_fpregs (const struct regcache *regcache, int tid, int regno) {}
|
||||
static void
|
||||
fetch_fpregs (struct regcache *regcache, int tid)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
store_fpregs (const struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@ -473,8 +480,17 @@ store_fpxregs (const struct regcache *regcache, int tid, int regno)
|
||||
|
||||
#else
|
||||
|
||||
static int fetch_fpxregs (struct regcache *regcache, int tid) { return 0; }
|
||||
static int store_fpxregs (const struct regcache *regcache, int tid, int regno) { return 0; }
|
||||
static int
|
||||
fetch_fpxregs (struct regcache *regcache, int tid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
store_fpxregs (const struct regcache *regcache, int tid, int regno)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* HAVE_PTRACE_GETFPXREGS */
|
||||
|
||||
|
@ -603,7 +603,8 @@ i386_linux_core_read_xcr0 (struct gdbarch *gdbarch,
|
||||
I386_LINUX_XSAVE_XCR0_OFFSET,
|
||||
8))
|
||||
{
|
||||
warning (_("Couldn't read `xcr0' bytes from `.reg-xstate' section in core file."));
|
||||
warning (_("Couldn't read `xcr0' bytes from "
|
||||
"`.reg-xstate' section in core file."));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -914,7 +915,7 @@ _initialize_i386_linux_tdep (void)
|
||||
gdbarch_register_osabi (bfd_arch_i386, 0, GDB_OSABI_LINUX,
|
||||
i386_linux_init_abi);
|
||||
|
||||
/* Initialize the Linux target description */
|
||||
/* Initialize the Linux target description. */
|
||||
initialize_tdesc_i386_linux ();
|
||||
initialize_tdesc_i386_mmx_linux ();
|
||||
initialize_tdesc_i386_avx_linux ();
|
||||
|
@ -269,7 +269,8 @@ i386_length_and_rw_bits (int len, enum target_hw_bp_type type)
|
||||
break;
|
||||
case hw_read:
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("The i386 doesn't support data-read watchpoints.\n"));
|
||||
_("The i386 doesn't support "
|
||||
"data-read watchpoints.\n"));
|
||||
case hw_access:
|
||||
rw = DR_RW_READ;
|
||||
break;
|
||||
|
@ -142,7 +142,7 @@ _initialize_amd64_sol2_nat (void)
|
||||
/* Fill in the generic procfs methods. */
|
||||
t = procfs_target ();
|
||||
|
||||
#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints */
|
||||
#ifdef NEW_PROC_API /* Solaris 6 and above can do HW watchpoints. */
|
||||
procfs_use_watchpoints (t);
|
||||
#endif
|
||||
|
||||
|
@ -445,17 +445,17 @@ i386_skip_prefixes (gdb_byte *insn, size_t max_len)
|
||||
static int
|
||||
i386_absolute_jmp_p (const gdb_byte *insn)
|
||||
{
|
||||
/* jmp far (absolute address in operand) */
|
||||
/* jmp far (absolute address in operand). */
|
||||
if (insn[0] == 0xea)
|
||||
return 1;
|
||||
|
||||
if (insn[0] == 0xff)
|
||||
{
|
||||
/* jump near, absolute indirect (/4) */
|
||||
/* jump near, absolute indirect (/4). */
|
||||
if ((insn[1] & 0x38) == 0x20)
|
||||
return 1;
|
||||
|
||||
/* jump far, absolute indirect (/5) */
|
||||
/* jump far, absolute indirect (/5). */
|
||||
if ((insn[1] & 0x38) == 0x28)
|
||||
return 1;
|
||||
}
|
||||
@ -466,17 +466,17 @@ i386_absolute_jmp_p (const gdb_byte *insn)
|
||||
static int
|
||||
i386_absolute_call_p (const gdb_byte *insn)
|
||||
{
|
||||
/* call far, absolute */
|
||||
/* call far, absolute. */
|
||||
if (insn[0] == 0x9a)
|
||||
return 1;
|
||||
|
||||
if (insn[0] == 0xff)
|
||||
{
|
||||
/* Call near, absolute indirect (/2) */
|
||||
/* Call near, absolute indirect (/2). */
|
||||
if ((insn[1] & 0x38) == 0x10)
|
||||
return 1;
|
||||
|
||||
/* Call far, absolute indirect (/3) */
|
||||
/* Call far, absolute indirect (/3). */
|
||||
if ((insn[1] & 0x38) == 0x18)
|
||||
return 1;
|
||||
}
|
||||
@ -489,9 +489,9 @@ i386_ret_p (const gdb_byte *insn)
|
||||
{
|
||||
switch (insn[0])
|
||||
{
|
||||
case 0xc2: /* ret near, pop N bytes */
|
||||
case 0xc2: /* ret near, pop N bytes. */
|
||||
case 0xc3: /* ret near */
|
||||
case 0xca: /* ret far, pop N bytes */
|
||||
case 0xca: /* ret far, pop N bytes. */
|
||||
case 0xcb: /* ret far */
|
||||
case 0xcf: /* iret */
|
||||
return 1;
|
||||
@ -507,7 +507,7 @@ i386_call_p (const gdb_byte *insn)
|
||||
if (i386_absolute_call_p (insn))
|
||||
return 1;
|
||||
|
||||
/* call near, relative */
|
||||
/* call near, relative. */
|
||||
if (insn[0] == 0xe8)
|
||||
return 1;
|
||||
|
||||
@ -2171,7 +2171,8 @@ i386_extract_return_value (struct gdbarch *gdbarch, struct type *type,
|
||||
}
|
||||
else
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("Cannot extract return value of %d bytes long."), len);
|
||||
_("Cannot extract return value of %d bytes long."),
|
||||
len);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2671,7 +2672,8 @@ i386_next_regnum (int regnum)
|
||||
needs any special handling. */
|
||||
|
||||
static int
|
||||
i386_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
|
||||
i386_convert_register_p (struct gdbarch *gdbarch,
|
||||
int regnum, struct type *type)
|
||||
{
|
||||
int len = TYPE_LENGTH (type);
|
||||
|
||||
@ -3556,9 +3558,9 @@ i386_record_push (struct i386_record_s *irp, int size)
|
||||
#define I386_SAVE_FPU_ENV 0xfffe
|
||||
#define I386_SAVE_FPU_ENV_REG_STACK 0xffff
|
||||
|
||||
/* Record the value of floating point registers which will be changed by the
|
||||
current instruction to "record_arch_list". Return -1 if something is wrong.
|
||||
*/
|
||||
/* Record the value of floating point registers which will be changed
|
||||
by the current instruction to "record_arch_list". Return -1 if
|
||||
something is wrong. */
|
||||
|
||||
static int i386_record_floats (struct gdbarch *gdbarch,
|
||||
struct i386_record_s *ir,
|
||||
@ -3753,7 +3755,7 @@ i386_process_record (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
else if (ir.regmap[X86_RECORD_R8_REGNUM])
|
||||
ir.aflag = 2;
|
||||
|
||||
/* now check op code */
|
||||
/* Now check op code. */
|
||||
opcode = (uint32_t) opcode8;
|
||||
reswitch:
|
||||
switch (opcode)
|
||||
@ -6456,7 +6458,8 @@ reswitch_prefix_add:
|
||||
|| opcode == 0x0f17 || opcode == 0x660f17)
|
||||
goto no_support;
|
||||
ir.rm |= ir.rex_b;
|
||||
if (!i386_xmm_regnum_p (gdbarch, I387_XMM0_REGNUM (tdep) + ir.rm))
|
||||
if (!i386_xmm_regnum_p (gdbarch,
|
||||
I387_XMM0_REGNUM (tdep) + ir.rm))
|
||||
goto no_support;
|
||||
record_arch_list_add_reg (ir.regcache,
|
||||
I387_XMM0_REGNUM (tdep) + ir.rm);
|
||||
@ -6688,7 +6691,8 @@ reswitch_prefix_add:
|
||||
if (ir.mod == 3)
|
||||
{
|
||||
ir.rm |= ir.rex_b;
|
||||
if (!i386_xmm_regnum_p (gdbarch, I387_XMM0_REGNUM (tdep) + ir.rm))
|
||||
if (!i386_xmm_regnum_p (gdbarch,
|
||||
I387_XMM0_REGNUM (tdep) + ir.rm))
|
||||
goto no_support;
|
||||
record_arch_list_add_reg (ir.regcache,
|
||||
I387_XMM0_REGNUM (tdep) + ir.rm);
|
||||
@ -6791,7 +6795,8 @@ i386_fast_tracepoint_valid_at (struct gdbarch *gdbarch,
|
||||
/* Return a bit of target-specific detail to add to the caller's
|
||||
generic failure message. */
|
||||
if (msg)
|
||||
*msg = xstrprintf (_("; instruction is only %d bytes long, need at least %d bytes for the jump"),
|
||||
*msg = xstrprintf (_("; instruction is only %d bytes long, "
|
||||
"need at least %d bytes for the jump"),
|
||||
len, jumplen);
|
||||
return 0;
|
||||
}
|
||||
|
@ -157,8 +157,8 @@ struct gdbarch_tdep
|
||||
int num_xmm_regs;
|
||||
|
||||
/* Bits of the extended control register 0 (the XFEATURE_ENABLED_MASK
|
||||
register), excluding the x87 bit, which are supported by this GDB.
|
||||
*/
|
||||
register), excluding the x87 bit, which are supported by this GDB. */
|
||||
|
||||
uint64_t xcr0;
|
||||
|
||||
/* Offset of XCR0 in XSAVE extended state. */
|
||||
@ -330,7 +330,8 @@ extern void i386_pseudo_register_write (struct gdbarch *gdbarch,
|
||||
/* Functions exported from i386-tdep.c. */
|
||||
extern CORE_ADDR i386_pe_skip_trampoline_code (struct frame_info *frame,
|
||||
CORE_ADDR pc, char *name);
|
||||
extern CORE_ADDR i386_skip_main_prologue (struct gdbarch *gdbarch, CORE_ADDR pc);
|
||||
extern CORE_ADDR i386_skip_main_prologue (struct gdbarch *gdbarch,
|
||||
CORE_ADDR pc);
|
||||
|
||||
/* Return whether the THIS_FRAME corresponds to a sigtramp routine. */
|
||||
extern int i386_sigtramp_p (struct frame_info *this_frame);
|
||||
|
@ -232,7 +232,8 @@ gnu_store_registers (struct target_ops *ops,
|
||||
state = proc_get_state (thread, 1);
|
||||
if (!state)
|
||||
{
|
||||
warning (_("Couldn't store registers into %s"), proc_string (thread));
|
||||
warning (_("Couldn't store registers into %s"),
|
||||
proc_string (thread));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -259,7 +260,8 @@ gnu_store_registers (struct target_ops *ops,
|
||||
regcache_raw_supply (regcache, check_regno,
|
||||
REG_ADDR (state, check_regno));
|
||||
else
|
||||
warning (_("... also writing this register! Suspicious..."));
|
||||
warning (_("... also writing this register! "
|
||||
"Suspicious..."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
|
||||
reg_offset = i386nbsd_sc_reg_offset;
|
||||
num_regs = ARRAY_SIZE (i386nbsd_sc_reg_offset);
|
||||
|
||||
/* Read in the sigcontext address */
|
||||
/* Read in the sigcontext address. */
|
||||
base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
|
||||
}
|
||||
else
|
||||
@ -254,7 +254,7 @@ i386nbsd_sigtramp_cache_init (const struct tramp_frame *self,
|
||||
reg_offset = i386nbsd_mc_reg_offset;
|
||||
num_regs = ARRAY_SIZE (i386nbsd_mc_reg_offset);
|
||||
|
||||
/* Read in the ucontext address */
|
||||
/* Read in the ucontext address. */
|
||||
base = read_memory_unsigned_integer (sp + 8, 4, byte_order);
|
||||
/* offsetof(ucontext_t, uc_mcontext) == 36 */
|
||||
base += 36;
|
||||
|
@ -253,7 +253,8 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
break;
|
||||
}
|
||||
|
||||
get_frame_register (frame, (fpreg + 8 - top) % 8 + I387_ST0_REGNUM (tdep),
|
||||
get_frame_register (frame,
|
||||
(fpreg + 8 - top) % 8 + I387_ST0_REGNUM (tdep),
|
||||
raw);
|
||||
|
||||
fputs_filtered ("0x", file);
|
||||
@ -287,7 +288,8 @@ i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file,
|
||||
needs any special handling. */
|
||||
|
||||
int
|
||||
i387_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
|
||||
i387_convert_register_p (struct gdbarch *gdbarch, int regnum,
|
||||
struct type *type)
|
||||
{
|
||||
if (i386_fp_regnum_p (gdbarch, regnum))
|
||||
{
|
||||
|
@ -51,7 +51,7 @@
|
||||
static int u_offsets[] =
|
||||
{
|
||||
/* general registers */
|
||||
-1, /* gr0 not available; i.e, it's always zero */
|
||||
-1, /* gr0 not available; i.e, it's always zero. */
|
||||
PT_R1,
|
||||
PT_R2,
|
||||
PT_R3,
|
||||
@ -83,7 +83,7 @@ static int u_offsets[] =
|
||||
PT_R29,
|
||||
PT_R30,
|
||||
PT_R31,
|
||||
/* gr32 through gr127 not directly available via the ptrace interface */
|
||||
/* gr32 through gr127 not directly available via the ptrace interface. */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
@ -91,7 +91,7 @@ static int u_offsets[] =
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
/* Floating point registers */
|
||||
-1, -1, /* f0 and f1 not available (f0 is +0.0 and f1 is +1.0) */
|
||||
-1, -1, /* f0 and f1 not available (f0 is +0.0 and f1 is +1.0). */
|
||||
PT_F2,
|
||||
PT_F3,
|
||||
PT_F4,
|
||||
@ -218,7 +218,7 @@ static int u_offsets[] =
|
||||
PT_F125,
|
||||
PT_F126,
|
||||
PT_F127,
|
||||
/* predicate registers - we don't fetch these individually */
|
||||
/* Predicate registers - we don't fetch these individually. */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1,
|
||||
@ -236,7 +236,7 @@ static int u_offsets[] =
|
||||
PT_B5,
|
||||
PT_B6,
|
||||
PT_B7,
|
||||
/* virtual frame pointer and virtual return address pointer */
|
||||
/* Virtual frame pointer and virtual return address pointer. */
|
||||
-1, -1,
|
||||
/* other registers */
|
||||
PT_PR,
|
||||
@ -252,7 +252,7 @@ static int u_offsets[] =
|
||||
PT_AR_BSPSTORE,
|
||||
PT_AR_RNAT,
|
||||
-1,
|
||||
-1, /* Not available: FCR, IA32 floating control register */
|
||||
-1, /* Not available: FCR, IA32 floating control register. */
|
||||
-1, -1,
|
||||
-1, /* Not available: EFLAG */
|
||||
-1, /* Not available: CSD */
|
||||
@ -273,7 +273,7 @@ static int u_offsets[] =
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
PT_AR_PFS,
|
||||
PT_AR_LC,
|
||||
-1, /* Not available: EC, the Epilog Count register */
|
||||
-1, /* Not available: EC, the Epilog Count register. */
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
|
||||
@ -508,7 +508,8 @@ store_debug_register (ptid_t ptid, int idx, long val)
|
||||
}
|
||||
|
||||
static void
|
||||
store_debug_register_pair (ptid_t ptid, int idx, long *dbr_addr, long *dbr_mask)
|
||||
store_debug_register_pair (ptid_t ptid, int idx, long *dbr_addr,
|
||||
long *dbr_mask)
|
||||
{
|
||||
if (dbr_addr)
|
||||
store_debug_register (ptid, 2 * idx, *dbr_addr);
|
||||
@ -547,7 +548,7 @@ ia64_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw,
|
||||
dbr_mask = debug_registers[idx * 2 + 1];
|
||||
if ((dbr_mask & (0x3UL << 62)) == 0)
|
||||
{
|
||||
/* Exit loop if both r and w bits clear */
|
||||
/* Exit loop if both r and w bits clear. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -650,7 +651,7 @@ ia64_linux_stopped_data_address (struct target_ops *ops, CORE_ADDR *addr_p)
|
||||
|
||||
regcache_cooked_read_unsigned (regcache, IA64_PSR_REGNUM, &psr);
|
||||
psr |= IA64_PSR_DD; /* Set the dd bit - this will disable the watchpoint
|
||||
for the next instruction */
|
||||
for the next instruction. */
|
||||
regcache_cooked_write_unsigned (regcache, IA64_PSR_REGNUM, psr);
|
||||
|
||||
*addr_p = (CORE_ADDR)siginfo_p->si_addr;
|
||||
@ -792,8 +793,8 @@ ia64_linux_store_registers (struct target_ops *ops,
|
||||
|
||||
|
||||
static LONGEST (*super_xfer_partial) (struct target_ops *, enum target_object,
|
||||
const char *, gdb_byte *, const gdb_byte *,
|
||||
ULONGEST, LONGEST);
|
||||
const char *, gdb_byte *,
|
||||
const gdb_byte *, ULONGEST, LONGEST);
|
||||
|
||||
static LONGEST
|
||||
ia64_linux_xfer_partial (struct target_ops *ops,
|
||||
|
@ -36,7 +36,7 @@
|
||||
#define GATE_AREA_START 0xa000000000000100LL
|
||||
#define GATE_AREA_END 0xa000000000020000LL
|
||||
|
||||
/* Offset to sigcontext structure from frame of handler */
|
||||
/* Offset to sigcontext structure from frame of handler. */
|
||||
#define IA64_LINUX_SIGCONTEXT_OFFSET 192
|
||||
|
||||
static int
|
||||
@ -58,7 +58,8 @@ ia64_linux_sigcontext_register_address (struct gdbarch *gdbarch,
|
||||
char buf[8];
|
||||
CORE_ADDR sigcontext_addr = 0;
|
||||
|
||||
/* The address of the sigcontext area is found at offset 16 in the sigframe. */
|
||||
/* The address of the sigcontext area is found at offset 16 in the
|
||||
sigframe. */
|
||||
read_memory (sp + 16, buf, 8);
|
||||
sigcontext_addr = extract_unsigned_integer (buf, 8, byte_order);
|
||||
|
||||
@ -79,7 +80,7 @@ ia64_linux_sigcontext_register_address (struct gdbarch *gdbarch,
|
||||
return sigcontext_addr + 56; /* user mask only */
|
||||
/* sc_ar_rsc is provided, from which we could compute bspstore, but
|
||||
I don't think it's worth it. Anyway, if we want it, it's at offset
|
||||
64 */
|
||||
64. */
|
||||
case IA64_BSP_REGNUM :
|
||||
return sigcontext_addr + 72;
|
||||
case IA64_RNAT_REGNUM :
|
||||
|
201
gdb/ia64-tdep.c
201
gdb/ia64-tdep.c
@ -106,7 +106,7 @@ typedef enum instruction_type
|
||||
|
||||
#define SLOT_MULTIPLIER 1
|
||||
|
||||
/* Length in bytes of an instruction bundle */
|
||||
/* Length in bytes of an instruction bundle. */
|
||||
|
||||
#define BUNDLE_LEN 16
|
||||
|
||||
@ -132,11 +132,15 @@ static int sp_regnum = IA64_GR12_REGNUM;
|
||||
static int fp_regnum = IA64_VFP_REGNUM;
|
||||
static int lr_regnum = IA64_VRAP_REGNUM;
|
||||
|
||||
/* NOTE: we treat the register stack registers r32-r127 as pseudo-registers because
|
||||
they may not be accessible via the ptrace register get/set interfaces. */
|
||||
enum pseudo_regs { FIRST_PSEUDO_REGNUM = NUM_IA64_RAW_REGS, VBOF_REGNUM = IA64_NAT127_REGNUM + 1, V32_REGNUM,
|
||||
/* NOTE: we treat the register stack registers r32-r127 as
|
||||
pseudo-registers because they may not be accessible via the ptrace
|
||||
register get/set interfaces. */
|
||||
|
||||
enum pseudo_regs { FIRST_PSEUDO_REGNUM = NUM_IA64_RAW_REGS,
|
||||
VBOF_REGNUM = IA64_NAT127_REGNUM + 1, V32_REGNUM,
|
||||
V127_REGNUM = V32_REGNUM + 95,
|
||||
VP0_REGNUM, VP16_REGNUM = VP0_REGNUM + 16, VP63_REGNUM = VP0_REGNUM + 63, LAST_PSEUDO_REGNUM };
|
||||
VP0_REGNUM, VP16_REGNUM = VP0_REGNUM + 16,
|
||||
VP63_REGNUM = VP0_REGNUM + 63, LAST_PSEUDO_REGNUM };
|
||||
|
||||
/* Array of register names; There should be ia64_num_regs strings in
|
||||
the initializer. */
|
||||
@ -259,9 +263,10 @@ struct ia64_frame_cache
|
||||
CORE_ADDR cfm; /* cfm value for current frame */
|
||||
CORE_ADDR prev_cfm; /* cfm value for previous frame */
|
||||
int frameless;
|
||||
int sof; /* Size of frame (decoded from cfm value) */
|
||||
int sol; /* Size of locals (decoded from cfm value) */
|
||||
int sor; /* Number of rotating registers. (decoded from cfm value) */
|
||||
int sof; /* Size of frame (decoded from cfm value). */
|
||||
int sol; /* Size of locals (decoded from cfm value). */
|
||||
int sor; /* Number of rotating registers (decoded from
|
||||
cfm value). */
|
||||
CORE_ADDR after_prologue;
|
||||
/* Address of first instruction after the last
|
||||
prologue instruction; Note that there may
|
||||
@ -394,7 +399,7 @@ extract_bit_field (const char *bundle, int from, int len)
|
||||
return result;
|
||||
}
|
||||
|
||||
/* Replace the specified bits in an instruction bundle */
|
||||
/* Replace the specified bits in an instruction bundle. */
|
||||
|
||||
static void
|
||||
replace_bit_field (char *bundle, long long val, int from, int len)
|
||||
@ -444,7 +449,7 @@ replace_bit_field (char *bundle, long long val, int from, int len)
|
||||
}
|
||||
|
||||
/* Return the contents of slot N (for N = 0, 1, or 2) in
|
||||
and instruction bundle */
|
||||
and instruction bundle. */
|
||||
|
||||
static long long
|
||||
slotN_contents (char *bundle, int slotnum)
|
||||
@ -452,7 +457,7 @@ slotN_contents (char *bundle, int slotnum)
|
||||
return extract_bit_field (bundle, 5+41*slotnum, 41);
|
||||
}
|
||||
|
||||
/* Store an instruction in an instruction bundle */
|
||||
/* Store an instruction in an instruction bundle. */
|
||||
|
||||
static void
|
||||
replace_slotN_contents (char *bundle, long long instr, int slotnum)
|
||||
@ -684,7 +689,8 @@ ia64_memory_insert_breakpoint (struct gdbarch *gdbarch,
|
||||
|
||||
/* Store the whole bundle, except for the initial skipped bytes by the slot
|
||||
number interpreted as bytes offset in PLACED_ADDRESS. */
|
||||
memcpy (bp_tgt->shadow_contents, bundle + shadow_slotnum, bp_tgt->shadow_len);
|
||||
memcpy (bp_tgt->shadow_contents, bundle + shadow_slotnum,
|
||||
bp_tgt->shadow_len);
|
||||
|
||||
/* Re-read the same bundle as above except that, this time, read it in order
|
||||
to compute the new bundle inside which we will be inserting the
|
||||
@ -812,7 +818,8 @@ ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
|
||||
make a match for permanent breakpoints. */
|
||||
|
||||
static const gdb_byte *
|
||||
ia64_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
|
||||
ia64_breakpoint_from_pc (struct gdbarch *gdbarch,
|
||||
CORE_ADDR *pcptr, int *lenptr)
|
||||
{
|
||||
CORE_ADDR addr = *pcptr;
|
||||
static gdb_byte bundle[BUNDLE_LEN];
|
||||
@ -929,15 +936,16 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
if (regnum >= V32_REGNUM && regnum <= V127_REGNUM)
|
||||
{
|
||||
#ifdef HAVE_LIBUNWIND_IA64_H
|
||||
/* First try and use the libunwind special reg accessor, otherwise fallback to
|
||||
standard logic. */
|
||||
/* First try and use the libunwind special reg accessor,
|
||||
otherwise fallback to standard logic. */
|
||||
if (!libunwind_is_initialized ()
|
||||
|| libunwind_get_reg_special (gdbarch, regcache, regnum, buf) != 0)
|
||||
#endif
|
||||
{
|
||||
/* The fallback position is to assume that r32-r127 are found sequentially
|
||||
in memory starting at $bof. This isn't always true, but without libunwind,
|
||||
this is the best we can do. */
|
||||
/* The fallback position is to assume that r32-r127 are
|
||||
found sequentially in memory starting at $bof. This
|
||||
isn't always true, but without libunwind, this is the
|
||||
best we can do. */
|
||||
ULONGEST cfm;
|
||||
ULONGEST bsp;
|
||||
CORE_ADDR reg;
|
||||
@ -945,7 +953,8 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
regcache_cooked_read_unsigned (regcache, IA64_CFM_REGNUM, &cfm);
|
||||
|
||||
/* The bsp points at the end of the register frame so we
|
||||
subtract the size of frame from it to get start of register frame. */
|
||||
subtract the size of frame from it to get start of
|
||||
register frame. */
|
||||
bsp = rse_address_add (bsp, -(cfm & 0x7f));
|
||||
|
||||
if ((cfm & 0x7f) > regnum - V32_REGNUM)
|
||||
@ -995,7 +1004,8 @@ ia64_pseudo_register_read (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
the nat collection from rnat. Otherwise, we fetch the nat
|
||||
collection from the computed address. */
|
||||
if (nat_addr >= bsp)
|
||||
regcache_cooked_read_unsigned (regcache, IA64_RNAT_REGNUM, &nat_collection);
|
||||
regcache_cooked_read_unsigned (regcache, IA64_RNAT_REGNUM,
|
||||
&nat_collection);
|
||||
else
|
||||
nat_collection = read_memory_integer (nat_addr, 8, byte_order);
|
||||
nat_bit = (gr_addr >> 3) & 0x3f;
|
||||
@ -1067,14 +1077,15 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
if ((cfm & 0x7f) > regnum - V32_REGNUM)
|
||||
{
|
||||
ULONGEST reg_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
|
||||
write_memory (reg_addr, (void *)buf, 8);
|
||||
write_memory (reg_addr, (void *) buf, 8);
|
||||
}
|
||||
}
|
||||
else if (IA64_NAT0_REGNUM <= regnum && regnum <= IA64_NAT31_REGNUM)
|
||||
{
|
||||
ULONGEST unatN_val, unat, unatN_mask;
|
||||
regcache_cooked_read_unsigned (regcache, IA64_UNAT_REGNUM, &unat);
|
||||
unatN_val = extract_unsigned_integer (buf, register_size (gdbarch, regnum),
|
||||
unatN_val = extract_unsigned_integer (buf, register_size (gdbarch,
|
||||
regnum),
|
||||
byte_order);
|
||||
unatN_mask = (1LL << (regnum - IA64_NAT0_REGNUM));
|
||||
if (unatN_val == 0)
|
||||
@ -1099,7 +1110,8 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
if ((cfm & 0x7f) > regnum - V32_REGNUM)
|
||||
gr_addr = rse_address_add (bsp, (regnum - V32_REGNUM));
|
||||
|
||||
natN_val = extract_unsigned_integer (buf, register_size (gdbarch, regnum),
|
||||
natN_val = extract_unsigned_integer (buf, register_size (gdbarch,
|
||||
regnum),
|
||||
byte_order);
|
||||
|
||||
if (gr_addr != 0 && (natN_val == 0 || natN_val == 1))
|
||||
@ -1114,12 +1126,14 @@ ia64_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
|
||||
collection from the computed address. */
|
||||
if (nat_addr >= bsp)
|
||||
{
|
||||
regcache_cooked_read_unsigned (regcache, IA64_RNAT_REGNUM, &nat_collection);
|
||||
regcache_cooked_read_unsigned (regcache, IA64_RNAT_REGNUM,
|
||||
&nat_collection);
|
||||
if (natN_val)
|
||||
nat_collection |= natN_mask;
|
||||
else
|
||||
nat_collection &= ~natN_mask;
|
||||
regcache_cooked_write_unsigned (regcache, IA64_RNAT_REGNUM, nat_collection);
|
||||
regcache_cooked_write_unsigned (regcache, IA64_RNAT_REGNUM,
|
||||
nat_collection);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1384,7 +1398,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
int qp = (int) (instr & 0x0000000003fLL);
|
||||
if (qp == 0 && rN == 2 && imm == 0 && rM == 12 && fp_reg == 0)
|
||||
{
|
||||
/* mov r2, r12 - beginning of leaf routine */
|
||||
/* mov r2, r12 - beginning of leaf routine. */
|
||||
fp_reg = rN;
|
||||
last_prologue_pc = next_pc;
|
||||
}
|
||||
@ -1493,7 +1507,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
else if (qp == 0 && rM >= 32 && rM < 40 && !instores[rM-32] &&
|
||||
rN < 256 && imm == 0)
|
||||
{
|
||||
/* mov rN, rM where rM is an input register */
|
||||
/* mov rN, rM where rM is an input register. */
|
||||
reg_contents[rN] = rM;
|
||||
last_prologue_pc = next_pc;
|
||||
}
|
||||
@ -1525,7 +1539,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
if ((instr & 0x1efc0000000LL) == 0x0eec0000000LL)
|
||||
spill_addr += imm;
|
||||
else
|
||||
spill_addr = 0; /* last one; must be done */
|
||||
spill_addr = 0; /* last one; must be done. */
|
||||
last_prologue_pc = next_pc;
|
||||
}
|
||||
}
|
||||
@ -1578,13 +1592,13 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
Record that fact and move on... */
|
||||
if (rM == unat_save_reg)
|
||||
{
|
||||
/* Track UNAT register */
|
||||
/* Track UNAT register. */
|
||||
cache->saved_regs[IA64_UNAT_REGNUM] = spill_addr;
|
||||
unat_save_reg = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Track PR register */
|
||||
/* Track PR register. */
|
||||
cache->saved_regs[IA64_PR_REGNUM] = spill_addr;
|
||||
pr_save_reg = 0;
|
||||
}
|
||||
@ -1592,7 +1606,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
/* st8 [rN] = rM, imm9 */
|
||||
spill_addr += imm9(instr);
|
||||
else
|
||||
spill_addr = 0; /* must be done spilling */
|
||||
spill_addr = 0; /* Must be done spilling. */
|
||||
last_prologue_pc = next_pc;
|
||||
}
|
||||
else if (qp == 0 && 32 <= rM && rM < 40 && !instores[rM-32])
|
||||
@ -1644,7 +1658,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
stfd [rN] = fM
|
||||
|
||||
Advance over stores of floating point input registers. Again
|
||||
one store per register is permitted */
|
||||
one store per register is permitted. */
|
||||
int fM = (int) ((instr & 0x000000fe000LL) >> 13);
|
||||
int qp = (int) (instr & 0x0000000003fLL);
|
||||
if (qp == 0 && 8 <= fM && fM < 16 && !infpstores[fM - 8])
|
||||
@ -1673,7 +1687,7 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
/* st8.spill [rN] = rM, imm9 */
|
||||
spill_addr += imm9(instr);
|
||||
else
|
||||
spill_addr = 0; /* Done spilling */
|
||||
spill_addr = 0; /* Done spilling. */
|
||||
last_prologue_pc = next_pc;
|
||||
}
|
||||
}
|
||||
@ -1754,7 +1768,8 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc,
|
||||
addr += 8;
|
||||
}
|
||||
if (i < sor)
|
||||
cache->saved_regs[IA64_GR32_REGNUM + ((i + (sor - rrb_gr)) % sor)]
|
||||
cache->saved_regs[IA64_GR32_REGNUM
|
||||
+ ((i + (sor - rrb_gr)) % sor)]
|
||||
= addr;
|
||||
else
|
||||
cache->saved_regs[IA64_GR32_REGNUM + i] = addr;
|
||||
@ -1784,7 +1799,8 @@ ia64_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
cache.cfm = 0;
|
||||
cache.bsp = 0;
|
||||
|
||||
/* Call examine_prologue with - as third argument since we don't have a next frame pointer to send. */
|
||||
/* Call examine_prologue with - as third argument since we don't
|
||||
have a next frame pointer to send. */
|
||||
return examine_prologue (pc, pc+1024, 0, &cache);
|
||||
}
|
||||
|
||||
@ -1851,7 +1867,8 @@ ia64_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
(*this_id) = frame_id_build_special (cache->base, cache->pc, cache->bsp);
|
||||
if (gdbarch_debug >= 1)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"regular frame id: code %s, stack %s, special %s, this_frame %s\n",
|
||||
"regular frame id: code %s, stack %s, "
|
||||
"special %s, this_frame %s\n",
|
||||
paddress (gdbarch, this_id->code_addr),
|
||||
paddress (gdbarch, this_id->stack_addr),
|
||||
paddress (gdbarch, cache->bsp),
|
||||
@ -2135,26 +2152,37 @@ ia64_sigtramp_frame_init_saved_regs (struct frame_info *this_frame,
|
||||
{
|
||||
int regno;
|
||||
|
||||
cache->saved_regs[IA64_VRAP_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_IP_REGNUM);
|
||||
cache->saved_regs[IA64_CFM_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_CFM_REGNUM);
|
||||
cache->saved_regs[IA64_PSR_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_PSR_REGNUM);
|
||||
cache->saved_regs[IA64_BSP_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_BSP_REGNUM);
|
||||
cache->saved_regs[IA64_RNAT_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_RNAT_REGNUM);
|
||||
cache->saved_regs[IA64_CCV_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_CCV_REGNUM);
|
||||
cache->saved_regs[IA64_UNAT_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_UNAT_REGNUM);
|
||||
cache->saved_regs[IA64_FPSR_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_FPSR_REGNUM);
|
||||
cache->saved_regs[IA64_PFS_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_PFS_REGNUM);
|
||||
cache->saved_regs[IA64_LC_REGNUM] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, IA64_LC_REGNUM);
|
||||
cache->saved_regs[IA64_VRAP_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_IP_REGNUM);
|
||||
cache->saved_regs[IA64_CFM_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_CFM_REGNUM);
|
||||
cache->saved_regs[IA64_PSR_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_PSR_REGNUM);
|
||||
cache->saved_regs[IA64_BSP_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_BSP_REGNUM);
|
||||
cache->saved_regs[IA64_RNAT_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_RNAT_REGNUM);
|
||||
cache->saved_regs[IA64_CCV_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_CCV_REGNUM);
|
||||
cache->saved_regs[IA64_UNAT_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_UNAT_REGNUM);
|
||||
cache->saved_regs[IA64_FPSR_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_FPSR_REGNUM);
|
||||
cache->saved_regs[IA64_PFS_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_PFS_REGNUM);
|
||||
cache->saved_regs[IA64_LC_REGNUM]
|
||||
= tdep->sigcontext_register_address (gdbarch, cache->base,
|
||||
IA64_LC_REGNUM);
|
||||
|
||||
for (regno = IA64_GR1_REGNUM; regno <= IA64_GR31_REGNUM; regno++)
|
||||
cache->saved_regs[regno] =
|
||||
tdep->sigcontext_register_address (gdbarch, cache->base, regno);
|
||||
@ -2213,7 +2241,8 @@ ia64_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
cache->bsp);
|
||||
if (gdbarch_debug >= 1)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"sigtramp frame id: code %s, stack %s, special %s, this_frame %s\n",
|
||||
"sigtramp frame id: code %s, stack %s, "
|
||||
"special %s, this_frame %s\n",
|
||||
paddress (gdbarch, this_id->code_addr),
|
||||
paddress (gdbarch, this_id->stack_addr),
|
||||
paddress (gdbarch, cache->bsp),
|
||||
@ -2447,9 +2476,10 @@ ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
|
||||
break;
|
||||
|
||||
case UNW_IA64_AR_BSP:
|
||||
/* Libunwind expects to see the beginning of the current register
|
||||
frame so we must account for the fact that ptrace() will return a value
|
||||
for bsp that points *after* the current register frame. */
|
||||
/* Libunwind expects to see the beginning of the current
|
||||
register frame so we must account for the fact that
|
||||
ptrace() will return a value for bsp that points *after*
|
||||
the current register frame. */
|
||||
get_frame_register (this_frame, IA64_BSP_REGNUM, buf);
|
||||
bsp = extract_unsigned_integer (buf, 8, byte_order);
|
||||
get_frame_register (this_frame, IA64_CFM_REGNUM, buf);
|
||||
@ -2483,8 +2513,8 @@ ia64_access_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
|
||||
|
||||
/* Libunwind callback accessor function for floating-point registers. */
|
||||
static int
|
||||
ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_fpreg_t *val,
|
||||
int write, void *arg)
|
||||
ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
|
||||
unw_fpreg_t *val, int write, void *arg)
|
||||
{
|
||||
int regnum = ia64_uw2gdb_regnum (uw_regnum);
|
||||
struct frame_info *this_frame = arg;
|
||||
@ -2499,8 +2529,8 @@ ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_fpreg_t *val
|
||||
|
||||
/* Libunwind callback accessor function for top-level rse registers. */
|
||||
static int
|
||||
ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *val,
|
||||
int write, void *arg)
|
||||
ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum,
|
||||
unw_word_t *val, int write, void *arg)
|
||||
{
|
||||
int regnum = ia64_uw2gdb_regnum (uw_regnum);
|
||||
unw_word_t bsp, sof, sol, cfm, psr, ip;
|
||||
@ -2526,9 +2556,10 @@ ia64_access_rse_reg (unw_addr_space_t as, unw_regnum_t uw_regnum, unw_word_t *va
|
||||
break;
|
||||
|
||||
case UNW_IA64_AR_BSP:
|
||||
/* Libunwind expects to see the beginning of the current register
|
||||
frame so we must account for the fact that ptrace() will return a value
|
||||
for bsp that points *after* the current register frame. */
|
||||
/* Libunwind expects to see the beginning of the current
|
||||
register frame so we must account for the fact that
|
||||
ptrace() will return a value for bsp that points *after*
|
||||
the current register frame. */
|
||||
regcache_cooked_read (regcache, IA64_BSP_REGNUM, buf);
|
||||
bsp = extract_unsigned_integer (buf, 8, byte_order);
|
||||
regcache_cooked_read (regcache, IA64_CFM_REGNUM, buf);
|
||||
@ -2881,7 +2912,8 @@ ia64_libunwind_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
|
||||
if (gdbarch_debug >= 1)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"libunwind frame id: code %s, stack %s, special %s, this_frame %s\n",
|
||||
"libunwind frame id: code %s, stack %s, "
|
||||
"special %s, this_frame %s\n",
|
||||
paddress (gdbarch, id.code_addr),
|
||||
paddress (gdbarch, id.stack_addr),
|
||||
paddress (gdbarch, bsp),
|
||||
@ -3013,7 +3045,8 @@ ia64_libunwind_sigtramp_frame_this_id (struct frame_info *this_frame,
|
||||
|
||||
if (gdbarch_debug >= 1)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"libunwind sigtramp frame id: code %s, stack %s, special %s, this_frame %s\n",
|
||||
"libunwind sigtramp frame id: code %s, "
|
||||
"stack %s, special %s, this_frame %s\n",
|
||||
paddress (gdbarch, id.code_addr),
|
||||
paddress (gdbarch, id.stack_addr),
|
||||
paddress (gdbarch, bsp),
|
||||
@ -3085,8 +3118,8 @@ static unw_accessors_t ia64_unw_accessors =
|
||||
|
||||
/* Set of special libunwind callback acccessor functions specific for accessing
|
||||
the rse registers. At the top of the stack, we want libunwind to figure out
|
||||
how to read r32 - r127. Though usually they are found sequentially in memory
|
||||
starting from $bof, this is not always true. */
|
||||
how to read r32 - r127. Though usually they are found sequentially in
|
||||
memory starting from $bof, this is not always true. */
|
||||
static unw_accessors_t ia64_unw_rse_accessors =
|
||||
{
|
||||
ia64_find_proc_info_x,
|
||||
@ -3099,7 +3132,8 @@ static unw_accessors_t ia64_unw_rse_accessors =
|
||||
/* get_proc_name */
|
||||
};
|
||||
|
||||
/* Set of ia64 gdb libunwind-frame callbacks and data for generic libunwind-frame code to use. */
|
||||
/* Set of ia64 gdb libunwind-frame callbacks and data for generic
|
||||
libunwind-frame code to use. */
|
||||
static struct libunwind_descr ia64_libunwind_descr =
|
||||
{
|
||||
ia64_gdb2uw_regnum,
|
||||
@ -3665,7 +3699,8 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
char val_buf[8];
|
||||
|
||||
memset (val_buf, 0, 8);
|
||||
memcpy (val_buf, value_contents (arg) + argoffset, (len > 8) ? 8 : len);
|
||||
memcpy (val_buf, value_contents (arg) + argoffset,
|
||||
(len > 8) ? 8 : len);
|
||||
|
||||
if (slotnum < rseslots)
|
||||
write_memory (rse_address_add (bsp, slotnum), val_buf, 8);
|
||||
@ -3686,8 +3721,9 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
while (len > 0 && floatreg < IA64_FR16_REGNUM)
|
||||
{
|
||||
char to[MAX_REGISTER_SIZE];
|
||||
convert_typed_floating (value_contents (arg) + argoffset, float_elt_type,
|
||||
to, ia64_ext_type (gdbarch));
|
||||
convert_typed_floating (value_contents (arg) + argoffset,
|
||||
float_elt_type, to,
|
||||
ia64_ext_type (gdbarch));
|
||||
regcache_cooked_write (regcache, floatreg, (void *)to);
|
||||
floatreg++;
|
||||
argoffset += TYPE_LENGTH (float_elt_type);
|
||||
@ -3699,7 +3735,8 @@ ia64_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
/* Store the struct return value in r8 if necessary. */
|
||||
if (struct_return)
|
||||
{
|
||||
regcache_cooked_write_unsigned (regcache, IA64_GR8_REGNUM, (ULONGEST)struct_addr);
|
||||
regcache_cooked_write_unsigned (regcache, IA64_GR8_REGNUM,
|
||||
(ULONGEST) struct_addr);
|
||||
}
|
||||
|
||||
global_pointer = ia64_find_global_pointer (gdbarch, func_addr);
|
||||
@ -3793,7 +3830,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
set_gdbarch_ptr_bit (gdbarch, 64);
|
||||
|
||||
set_gdbarch_num_regs (gdbarch, NUM_IA64_RAW_REGS);
|
||||
set_gdbarch_num_pseudo_regs (gdbarch, LAST_PSEUDO_REGNUM - FIRST_PSEUDO_REGNUM);
|
||||
set_gdbarch_num_pseudo_regs (gdbarch,
|
||||
LAST_PSEUDO_REGNUM - FIRST_PSEUDO_REGNUM);
|
||||
set_gdbarch_sp_regnum (gdbarch, sp_regnum);
|
||||
set_gdbarch_fp0_regnum (gdbarch, IA64_FR0_REGNUM);
|
||||
|
||||
@ -3812,8 +3850,10 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
|
||||
set_gdbarch_return_value (gdbarch, ia64_return_value);
|
||||
|
||||
set_gdbarch_memory_insert_breakpoint (gdbarch, ia64_memory_insert_breakpoint);
|
||||
set_gdbarch_memory_remove_breakpoint (gdbarch, ia64_memory_remove_breakpoint);
|
||||
set_gdbarch_memory_insert_breakpoint (gdbarch,
|
||||
ia64_memory_insert_breakpoint);
|
||||
set_gdbarch_memory_remove_breakpoint (gdbarch,
|
||||
ia64_memory_remove_breakpoint);
|
||||
set_gdbarch_breakpoint_from_pc (gdbarch, ia64_breakpoint_from_pc);
|
||||
set_gdbarch_read_pc (gdbarch, ia64_read_pc);
|
||||
set_gdbarch_write_pc (gdbarch, ia64_write_pc);
|
||||
@ -3840,7 +3880,8 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
|
||||
set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
|
||||
|
||||
set_gdbarch_print_insn (gdbarch, ia64_print_insn);
|
||||
set_gdbarch_convert_from_func_ptr_addr (gdbarch, ia64_convert_from_func_ptr_addr);
|
||||
set_gdbarch_convert_from_func_ptr_addr (gdbarch,
|
||||
ia64_convert_from_func_ptr_addr);
|
||||
|
||||
/* The virtual table contains 16-byte descriptors, not pointers to
|
||||
descriptors. */
|
||||
|
@ -264,7 +264,7 @@ find_function_addr (struct value *function, struct type **retval_type)
|
||||
else if (code == TYPE_CODE_INT)
|
||||
{
|
||||
/* Handle the case of functions lacking debugging info.
|
||||
Their values are characters since their addresses are char */
|
||||
Their values are characters since their addresses are char. */
|
||||
if (TYPE_LENGTH (ftype) == 1)
|
||||
funaddr = value_as_address (value_addr (function));
|
||||
else
|
||||
|
43
gdb/infcmd.c
43
gdb/infcmd.c
@ -540,7 +540,7 @@ run_command_1 (char *args, int from_tty, int tbreak_at_main)
|
||||
to simulate synchronous (fg) execution. */
|
||||
if (!async_exec && target_can_async_p ())
|
||||
{
|
||||
/* Simulate synchronous execution */
|
||||
/* Simulate synchronous execution. */
|
||||
async_disable_stdin ();
|
||||
}
|
||||
|
||||
@ -713,7 +713,7 @@ continue_command (char *args, int from_tty)
|
||||
foreground, synchronously. */
|
||||
if (!async_exec && target_can_async_p ())
|
||||
{
|
||||
/* Simulate synchronous execution */
|
||||
/* Simulate synchronous execution. */
|
||||
async_disable_stdin ();
|
||||
}
|
||||
|
||||
@ -856,13 +856,13 @@ step_1 (int skip_subroutines, int single_inst, char *count_string)
|
||||
to simulate synchronous (fg) execution. */
|
||||
if (!async_exec && target_can_async_p ())
|
||||
{
|
||||
/* Simulate synchronous execution */
|
||||
/* Simulate synchronous execution. */
|
||||
async_disable_stdin ();
|
||||
}
|
||||
|
||||
count = count_string ? parse_and_eval_long (count_string) : 1;
|
||||
|
||||
if (!single_inst || skip_subroutines) /* leave si command alone */
|
||||
if (!single_inst || skip_subroutines) /* Leave si command alone. */
|
||||
{
|
||||
struct thread_info *tp = inferior_thread ();
|
||||
|
||||
@ -1096,7 +1096,7 @@ jump_command (char *arg, int from_tty)
|
||||
if (sal.symtab == 0 && sal.pc == 0)
|
||||
error (_("No source file has been specified."));
|
||||
|
||||
resolve_sal_pc (&sal); /* May error out */
|
||||
resolve_sal_pc (&sal); /* May error out. */
|
||||
|
||||
/* See if we are trying to jump to another function. */
|
||||
fn = get_frame_function (get_current_frame ());
|
||||
@ -1139,7 +1139,7 @@ jump_command (char *arg, int from_tty)
|
||||
foreground, synchronously. */
|
||||
if (!async_exec && target_can_async_p ())
|
||||
{
|
||||
/* Simulate synchronous execution */
|
||||
/* Simulate synchronous execution. */
|
||||
async_disable_stdin ();
|
||||
}
|
||||
|
||||
@ -1148,7 +1148,7 @@ jump_command (char *arg, int from_tty)
|
||||
}
|
||||
|
||||
|
||||
/* Go to line or address in current procedure */
|
||||
/* Go to line or address in current procedure. */
|
||||
static void
|
||||
go_command (char *line_no, int from_tty)
|
||||
{
|
||||
@ -1325,7 +1325,7 @@ until_command (char *arg, int from_tty)
|
||||
foreground, synchronously. */
|
||||
if (!async_exec && target_can_async_p ())
|
||||
{
|
||||
/* Simulate synchronous execution */
|
||||
/* Simulate synchronous execution. */
|
||||
async_disable_stdin ();
|
||||
}
|
||||
|
||||
@ -1816,7 +1816,7 @@ set_environment_command (char *arg, int from_tty)
|
||||
if (arg == 0)
|
||||
error_no_arg (_("environment variable and value"));
|
||||
|
||||
/* Find seperation between variable name and value */
|
||||
/* Find seperation between variable name and value. */
|
||||
p = (char *) strchr (arg, '=');
|
||||
val = (char *) strchr (arg, ' ');
|
||||
|
||||
@ -1844,11 +1844,11 @@ set_environment_command (char *arg, int from_tty)
|
||||
{
|
||||
nullset = 1;
|
||||
if (p == 0)
|
||||
p = arg + strlen (arg); /* So that savestring below will work */
|
||||
p = arg + strlen (arg); /* So that savestring below will work. */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Not setting variable value to null */
|
||||
/* Not setting variable value to null. */
|
||||
val = p + 1;
|
||||
while (*val == ' ' || *val == '\t')
|
||||
val++;
|
||||
@ -1887,7 +1887,7 @@ unset_environment_command (char *var, int from_tty)
|
||||
unset_in_environ (current_inferior ()->environment, var);
|
||||
}
|
||||
|
||||
/* Handle the execution path (PATH variable) */
|
||||
/* Handle the execution path (PATH variable). */
|
||||
|
||||
static const char path_var_name[] = "PATH";
|
||||
|
||||
@ -1910,7 +1910,7 @@ path_command (char *dirname, int from_tty)
|
||||
|
||||
dont_repeat ();
|
||||
env = get_in_environ (current_inferior ()->environment, path_var_name);
|
||||
/* Can be null if path is not set */
|
||||
/* Can be null if path is not set. */
|
||||
if (!env)
|
||||
env = "";
|
||||
exec_path = xstrdup (env);
|
||||
@ -2215,7 +2215,7 @@ kill_command (char *arg, int from_tty)
|
||||
with their threads. */
|
||||
if (!have_inferiors ())
|
||||
{
|
||||
init_thread_list (); /* Destroy thread info */
|
||||
init_thread_list (); /* Destroy thread info. */
|
||||
|
||||
/* Killing off the inferior can leave us with a core file. If
|
||||
so, print the state we are left in. */
|
||||
@ -2280,8 +2280,7 @@ proceed_after_attach (int pid)
|
||||
* This only needs to be done if we are attaching to a process.
|
||||
*/
|
||||
|
||||
/*
|
||||
attach_command --
|
||||
/* attach_command --
|
||||
takes a program started up outside of gdb and ``attaches'' to it.
|
||||
This stops it cold in its tracks and allows us to start debugging it.
|
||||
and wait for the trace-trap that results from attaching. */
|
||||
@ -2310,8 +2309,8 @@ attach_command_post_wait (char *args, int from_tty, int async_exec)
|
||||
|
||||
Attempt to qualify the filename against the source path.
|
||||
(If that fails, we'll just fall back on the original
|
||||
filename. Not much more we can do...)
|
||||
*/
|
||||
filename. Not much more we can do...) */
|
||||
|
||||
if (!source_full_path_of (exec_file, &full_exec_path))
|
||||
full_exec_path = xstrdup (exec_file);
|
||||
|
||||
@ -2443,7 +2442,7 @@ attach_command (char *args, int from_tty)
|
||||
to simulate synchronous (fg) execution. */
|
||||
if (!async_exec && target_can_async_p ())
|
||||
{
|
||||
/* Simulate synchronous execution */
|
||||
/* Simulate synchronous execution. */
|
||||
async_disable_stdin ();
|
||||
make_cleanup ((make_cleanup_ftype *)async_enable_stdin, NULL);
|
||||
}
|
||||
@ -2623,7 +2622,7 @@ detach_command (char *args, int from_tty)
|
||||
static void
|
||||
disconnect_command (char *args, int from_tty)
|
||||
{
|
||||
dont_repeat (); /* Not for the faint of heart */
|
||||
dont_repeat (); /* Not for the faint of heart. */
|
||||
target_disconnect (args, from_tty);
|
||||
no_shared_libraries (NULL, from_tty);
|
||||
init_thread_list ();
|
||||
@ -2665,7 +2664,7 @@ interrupt_target_command (char *args, int from_tty)
|
||||
{
|
||||
int all_threads = 0;
|
||||
|
||||
dont_repeat (); /* Not for the faint of heart */
|
||||
dont_repeat (); /* Not for the faint of heart. */
|
||||
|
||||
if (args != NULL
|
||||
&& strncmp (args, "-a", sizeof ("-a") - 1) == 0)
|
||||
@ -2730,7 +2729,7 @@ _initialize_infcmd (void)
|
||||
{
|
||||
struct cmd_list_element *c = NULL;
|
||||
|
||||
/* add the filename of the terminal connected to inferior I/O */
|
||||
/* Add the filename of the terminal connected to inferior I/O. */
|
||||
add_setshow_filename_cmd ("inferior-tty", class_run,
|
||||
&inferior_io_terminal_scratch, _("\
|
||||
Set terminal for future runs of program being debugged."), _("\
|
||||
|
@ -830,7 +830,7 @@ add_inferior_command (char *args, int from_tty)
|
||||
if (exec != NULL)
|
||||
{
|
||||
/* Switch over temporarily, while reading executable and
|
||||
symbols.q */
|
||||
symbols.q. */
|
||||
set_current_program_space (inf->pspace);
|
||||
set_current_inferior (inf);
|
||||
switch_to_thread (null_ptid);
|
||||
|
@ -87,7 +87,7 @@ long ptid_get_lwp (ptid_t ptid);
|
||||
/* Fetch the tid (thread id) component from a ptid. */
|
||||
long ptid_get_tid (ptid_t ptid);
|
||||
|
||||
/* Compare two ptids to see if they are equal */
|
||||
/* Compare two ptids to see if they are equal. */
|
||||
extern int ptid_equal (ptid_t p1, ptid_t p2);
|
||||
|
||||
/* Return true if PTID represents a process id. */
|
||||
|
10
gdb/inflow.c
10
gdb/inflow.c
@ -409,8 +409,8 @@ terminal_ours_1 (int output_only)
|
||||
mode, to avoid flushing input. We need to do the same thing
|
||||
regardless of output_only, because we don't have separate
|
||||
terminal_is_ours and terminal_is_ours_for_output flags. It's OK,
|
||||
though, since readline will deal with raw mode when/if it needs to.
|
||||
*/
|
||||
though, since readline will deal with raw mode when/if it needs
|
||||
to. */
|
||||
|
||||
serial_noflush_set_tty_state (stdin_serial, our_terminal_info.ttystate,
|
||||
tinfo->ttystate);
|
||||
@ -566,7 +566,7 @@ child_terminal_info (char *args, int from_tty)
|
||||
#ifndef O_ACCMODE
|
||||
#define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR)
|
||||
#endif
|
||||
/* (O_ACCMODE) parens are to avoid Ultrix header file bug */
|
||||
/* (O_ACCMODE) parens are to avoid Ultrix header file bug. */
|
||||
switch (flags & (O_ACCMODE))
|
||||
{
|
||||
case O_RDONLY:
|
||||
@ -732,7 +732,7 @@ new_tty_postfork (void)
|
||||
|
||||
|
||||
/* Call set_sigint_trap when you need to pass a signal on to an attached
|
||||
process when handling SIGINT */
|
||||
process when handling SIGINT. */
|
||||
|
||||
static void
|
||||
pass_signal (int signo)
|
||||
@ -867,7 +867,7 @@ _initialize_inflow (void)
|
||||
#ifdef _SC_JOB_CONTROL
|
||||
job_control = sysconf (_SC_JOB_CONTROL);
|
||||
#else
|
||||
job_control = 0; /* have to assume the worst */
|
||||
job_control = 0; /* Have to assume the worst. */
|
||||
#endif /* _SC_JOB_CONTROL */
|
||||
#endif /* _POSIX_JOB_CONTROL */
|
||||
#endif /* HAVE_TERMIOS */
|
||||
|
34
gdb/infrun.c
34
gdb/infrun.c
@ -292,7 +292,7 @@ static unsigned char *signal_program;
|
||||
(flags)[signum] = 0; \
|
||||
} while (0)
|
||||
|
||||
/* Value to pass to target_resume() to cause all threads to resume */
|
||||
/* Value to pass to target_resume() to cause all threads to resume. */
|
||||
|
||||
#define RESUME_ALL minus_one_ptid
|
||||
|
||||
@ -606,7 +606,7 @@ handle_vfork_child_exec_or_exit (int exec)
|
||||
struct program_space *pspace;
|
||||
struct address_space *aspace;
|
||||
|
||||
/* follow-fork child, detach-on-fork on */
|
||||
/* follow-fork child, detach-on-fork on. */
|
||||
|
||||
old_chain = make_cleanup_restore_current_thread ();
|
||||
|
||||
@ -874,13 +874,13 @@ follow_exec (ptid_t pid, char *execd_pathname)
|
||||
|
||||
/* Reinsert all breakpoints. (Those which were symbolic have
|
||||
been reset to the proper address in the new a.out, thanks
|
||||
to symbol_file_command...) */
|
||||
to symbol_file_command...). */
|
||||
insert_breakpoints ();
|
||||
|
||||
/* The next resume of this inferior should bring it to the shlib
|
||||
startup breakpoints. (If the user had also set bp's on
|
||||
"main" from the old (parent) process, then they'll auto-
|
||||
matically get reset there in the new process.) */
|
||||
matically get reset there in the new process.). */
|
||||
}
|
||||
|
||||
/* Non-zero if we just simulating a single-step. This is needed
|
||||
@ -1560,7 +1560,7 @@ maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
hw_step = 0;
|
||||
/* Do not pull these breakpoints until after a `wait' in
|
||||
`wait_for_inferior' */
|
||||
`wait_for_inferior'. */
|
||||
singlestep_breakpoints_inserted_p = 1;
|
||||
singlestep_ptid = inferior_ptid;
|
||||
singlestep_pc = pc;
|
||||
@ -3028,7 +3028,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
/* Always clear state belonging to the previous time we stopped. */
|
||||
stop_stack_dummy = STOP_NONE;
|
||||
|
||||
/* If it's a new process, add it to the thread database */
|
||||
/* If it's a new process, add it to the thread database. */
|
||||
|
||||
ecs->new_thread_event = (!ptid_equal (ecs->ptid, inferior_ptid)
|
||||
&& !ptid_equal (ecs->ptid, minus_one_ptid)
|
||||
@ -3207,7 +3207,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
set_current_inferior (find_inferior_pid (ptid_get_pid (ecs->ptid)));
|
||||
set_current_program_space (current_inferior ()->pspace);
|
||||
handle_vfork_child_exec_or_exit (0);
|
||||
target_terminal_ours (); /* Must do this before mourn anyway */
|
||||
target_terminal_ours (); /* Must do this before mourn anyway. */
|
||||
print_exited_reason (ecs->ws.value.integer);
|
||||
|
||||
/* Record the exit code in the convenience variable $_exitcode, so
|
||||
@ -3230,7 +3230,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
set_current_program_space (current_inferior ()->pspace);
|
||||
handle_vfork_child_exec_or_exit (0);
|
||||
stop_print_frame = 0;
|
||||
target_terminal_ours (); /* Must do this before mourn anyway */
|
||||
target_terminal_ours (); /* Must do this before mourn anyway. */
|
||||
|
||||
/* Note: By definition of TARGET_WAITKIND_SIGNALLED, we shouldn't
|
||||
reach here unless the inferior is dead. However, for years
|
||||
@ -3418,7 +3418,7 @@ handle_inferior_event (struct execution_control_state *ecs)
|
||||
if (debug_infrun)
|
||||
fprintf_unfiltered (gdb_stdlog,
|
||||
"infrun: TARGET_WAITKIND_SYSCALL_ENTRY\n");
|
||||
/* Getting the current syscall number */
|
||||
/* Getting the current syscall number. */
|
||||
if (handle_syscall_event (ecs) != 0)
|
||||
return;
|
||||
goto process_event_stop_test;
|
||||
@ -5307,7 +5307,7 @@ stop_stepping (struct execution_control_state *ecs)
|
||||
|
||||
/* This function handles various cases where we need to continue
|
||||
waiting for the inferior. */
|
||||
/* (Used to be the keep_going: label in the old wait_for_inferior) */
|
||||
/* (Used to be the keep_going: label in the old wait_for_inferior). */
|
||||
|
||||
static void
|
||||
keep_going (struct execution_control_state *ecs)
|
||||
@ -5687,15 +5687,15 @@ normal_stop (void)
|
||||
&& frame_id_eq (tp->control.step_frame_id,
|
||||
get_frame_id (get_current_frame ()))
|
||||
&& step_start_function == find_pc_function (stop_pc))
|
||||
source_flag = SRC_LINE; /* finished step, just
|
||||
print source line */
|
||||
source_flag = SRC_LINE; /* Finished step, just
|
||||
print source line. */
|
||||
else
|
||||
source_flag = SRC_AND_LOC; /* print location and
|
||||
source line */
|
||||
source_flag = SRC_AND_LOC; /* Print location and
|
||||
source line. */
|
||||
break;
|
||||
case PRINT_SRC_AND_LOC:
|
||||
source_flag = SRC_AND_LOC; /* print location and
|
||||
source line */
|
||||
source_flag = SRC_AND_LOC; /* Print location and
|
||||
source line. */
|
||||
break;
|
||||
case PRINT_SRC_ONLY:
|
||||
source_flag = SRC_LINE;
|
||||
@ -5712,7 +5712,7 @@ normal_stop (void)
|
||||
flag is:
|
||||
SRC_LINE: Print only source line
|
||||
LOCATION: Print only location
|
||||
SRC_AND_LOC: Print location and source line */
|
||||
SRC_AND_LOC: Print location and source line. */
|
||||
if (do_frame_printing)
|
||||
print_stack_frame (get_selected_frame (NULL), 0, source_flag);
|
||||
|
||||
|
@ -391,7 +391,7 @@ interpreter_exec_cmd (char *args, int from_tty)
|
||||
if (interp_to_use == NULL)
|
||||
error (_("Could not find interpreter \"%s\"."), prules[0]);
|
||||
|
||||
/* Temporarily set interpreters quiet */
|
||||
/* Temporarily set interpreters quiet. */
|
||||
old_quiet = interp_set_quiet (old_interp, 1);
|
||||
use_quiet = interp_set_quiet (interp_to_use, 1);
|
||||
|
||||
@ -445,12 +445,12 @@ interpreter_completer (struct cmd_list_element *ignore, char *text, char *word)
|
||||
strcpy (matches[num_matches], interp->name);
|
||||
else if (word > text)
|
||||
{
|
||||
/* Return some portion of interp->name */
|
||||
/* Return some portion of interp->name. */
|
||||
strcpy (matches[num_matches], interp->name + (word - text));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Return some of text plus interp->name */
|
||||
/* Return some of text plus interp->name. */
|
||||
strncpy (matches[num_matches], word, text - word);
|
||||
matches[num_matches][text - word] = '\0';
|
||||
strcat (matches[num_matches], interp->name);
|
||||
|
@ -260,7 +260,7 @@ iq2000_scan_prologue (struct gdbarch *gdbarch,
|
||||
if ((insn & 0xffff8000) == 0x20218000)
|
||||
{
|
||||
/* addi %1, %1, -N == addi %sp, %sp, -N */
|
||||
/* LEGACY -- from assembly-only port */
|
||||
/* LEGACY -- from assembly-only port. */
|
||||
found_decr_sp = 1;
|
||||
cache->framesize = -((signed short) (insn & 0xffff));
|
||||
continue;
|
||||
@ -284,7 +284,7 @@ iq2000_scan_prologue (struct gdbarch *gdbarch,
|
||||
|
||||
if (tgtreg == E_SP_REGNUM || tgtreg == E_FP_REGNUM)
|
||||
{
|
||||
/* "push" to stack (via SP or FP reg) */
|
||||
/* "push" to stack (via SP or FP reg). */
|
||||
if (cache->saved_regs[srcreg] == -1) /* Don't save twice. */
|
||||
cache->saved_regs[srcreg] = offset;
|
||||
continue;
|
||||
@ -404,7 +404,8 @@ static struct value *
|
||||
iq2000_frame_prev_register (struct frame_info *this_frame, void **this_cache,
|
||||
int regnum)
|
||||
{
|
||||
struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame, this_cache);
|
||||
struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame,
|
||||
this_cache);
|
||||
|
||||
if (regnum == E_SP_REGNUM && cache->saved_sp)
|
||||
return frame_unwind_got_constant (this_frame, regnum, cache->saved_sp);
|
||||
@ -423,7 +424,8 @@ static void
|
||||
iq2000_frame_this_id (struct frame_info *this_frame, void **this_cache,
|
||||
struct frame_id *this_id)
|
||||
{
|
||||
struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame, this_cache);
|
||||
struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame,
|
||||
this_cache);
|
||||
|
||||
/* This marks the outermost frame. */
|
||||
if (cache->base == 0)
|
||||
@ -462,7 +464,8 @@ iq2000_dummy_id (struct gdbarch *gdbarch, struct frame_info *this_frame)
|
||||
static CORE_ADDR
|
||||
iq2000_frame_base_address (struct frame_info *this_frame, void **this_cache)
|
||||
{
|
||||
struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame, this_cache);
|
||||
struct iq2000_frame_cache *cache = iq2000_frame_cache (this_frame,
|
||||
this_cache);
|
||||
|
||||
return cache->base;
|
||||
}
|
||||
@ -679,7 +682,7 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
if (argreg <= E_LAST_ARGREG - 1)
|
||||
{
|
||||
/* 8-byte arg goes into a register pair
|
||||
(must start with an even-numbered reg) */
|
||||
(must start with an even-numbered reg). */
|
||||
if (((argreg - E_1ST_ARGREG) % 2) != 0)
|
||||
argreg ++;
|
||||
argreg += 2;
|
||||
@ -753,7 +756,7 @@ iq2000_push_dummy_call (struct gdbarch *gdbarch, struct value *function,
|
||||
if (argreg <= E_LAST_ARGREG - 1)
|
||||
{
|
||||
/* 8-byte arg goes into a register pair
|
||||
(must start with an even-numbered reg) */
|
||||
(must start with an even-numbered reg). */
|
||||
if (((argreg - E_1ST_ARGREG) % 2) != 0)
|
||||
argreg++;
|
||||
regcache_raw_write (regcache, argreg++, val);
|
||||
|
@ -171,7 +171,8 @@ supply_fpregset (struct regcache *regcache, const fpregset_t *fpregsetp)
|
||||
}
|
||||
|
||||
void
|
||||
fill_fpregset (const struct regcache *regcache, fpregset_t *fpregsetp, int regno)
|
||||
fill_fpregset (const struct regcache *regcache,
|
||||
fpregset_t *fpregsetp, int regno)
|
||||
{
|
||||
int regi;
|
||||
char *from, *to;
|
||||
@ -248,7 +249,7 @@ fetch_core_registers (struct regcache *regcache,
|
||||
}
|
||||
|
||||
/* Register that we are able to handle irix5 core file formats.
|
||||
This really is bfd_target_unknown_flavour */
|
||||
This really is bfd_target_unknown_flavour. */
|
||||
|
||||
static struct core_fns irix5_core_fns =
|
||||
{
|
||||
|
31
gdb/jit.c
31
gdb/jit.c
@ -146,7 +146,8 @@ bfd_open_from_target_memory (CORE_ADDR addr, ULONGEST size, char *target)
|
||||
mem_bfd_iovec_stat);
|
||||
}
|
||||
|
||||
/* Helper function for reading the global JIT descriptor from remote memory. */
|
||||
/* Helper function for reading the global JIT descriptor from remote
|
||||
memory. */
|
||||
|
||||
static void
|
||||
jit_read_descriptor (struct gdbarch *gdbarch,
|
||||
@ -296,7 +297,8 @@ JITed symbol file is not an object file, ignoring it.\n"));
|
||||
discard_cleanups (old_cleanups);
|
||||
}
|
||||
|
||||
/* This function unregisters JITed code and frees the corresponding objfile. */
|
||||
/* This function unregisters JITed code and frees the corresponding
|
||||
objfile. */
|
||||
|
||||
static void
|
||||
jit_unregister_code (struct objfile *objfile)
|
||||
@ -372,8 +374,8 @@ jit_inferior_init (struct gdbarch *gdbarch)
|
||||
"jit_inferior_init, jit_descriptor_addr = %s\n",
|
||||
paddress (gdbarch, jit_descriptor_addr));
|
||||
|
||||
/* Read the descriptor so we can check the version number and load any already
|
||||
JITed functions. */
|
||||
/* Read the descriptor so we can check the version number and load
|
||||
any already JITed functions. */
|
||||
jit_read_descriptor (gdbarch, &descriptor);
|
||||
|
||||
/* Check that the version number agrees with that we support. */
|
||||
@ -383,8 +385,8 @@ jit_inferior_init (struct gdbarch *gdbarch)
|
||||
/* Put a breakpoint in the registration symbol. */
|
||||
create_jit_event_breakpoint (gdbarch, reg_addr);
|
||||
|
||||
/* If we've attached to a running program, we need to check the descriptor to
|
||||
register any functions that were already generated. */
|
||||
/* If we've attached to a running program, we need to check the descriptor
|
||||
to register any functions that were already generated. */
|
||||
for (cur_entry_addr = descriptor.first_entry;
|
||||
cur_entry_addr != 0;
|
||||
cur_entry_addr = cur_entry.next_entry)
|
||||
@ -425,9 +427,9 @@ jit_inferior_created_observer (struct target_ops *objfile, int from_tty)
|
||||
jit_inferior_init (target_gdbarch);
|
||||
}
|
||||
|
||||
/* This function cleans up any code entries left over when the inferior exits.
|
||||
We get left over code when the inferior exits without unregistering its code,
|
||||
for example when it crashes. */
|
||||
/* This function cleans up any code entries left over when the
|
||||
inferior exits. We get left over code when the inferior exits
|
||||
without unregistering its code, for example when it crashes. */
|
||||
|
||||
static void
|
||||
jit_inferior_exit_hook (struct inferior *inf)
|
||||
@ -468,7 +470,8 @@ jit_event_handler (struct gdbarch *gdbarch)
|
||||
case JIT_UNREGISTER:
|
||||
objf = jit_find_objf_with_entry_addr (entry_addr);
|
||||
if (objf == NULL)
|
||||
printf_unfiltered (_("Unable to find JITed code entry at address: %s\n"),
|
||||
printf_unfiltered (_("Unable to find JITed code "
|
||||
"entry at address: %s\n"),
|
||||
paddress (gdbarch, entry_addr));
|
||||
else
|
||||
jit_unregister_code (objf);
|
||||
@ -487,10 +490,10 @@ extern void _initialize_jit (void);
|
||||
void
|
||||
_initialize_jit (void)
|
||||
{
|
||||
add_setshow_zinteger_cmd ("jit", class_maintenance, &jit_debug, _("\
|
||||
Set JIT debugging."), _("\
|
||||
Show JIT debugging."), _("\
|
||||
When non-zero, JIT debugging is enabled."),
|
||||
add_setshow_zinteger_cmd ("jit", class_maintenance, &jit_debug,
|
||||
_("Set JIT debugging."),
|
||||
_("Show JIT debugging."),
|
||||
_("When non-zero, JIT debugging is enabled."),
|
||||
NULL,
|
||||
show_jit_debug,
|
||||
&setdebuglist, &showdebuglist);
|
||||
|
39
gdb/jit.h
39
gdb/jit.h
@ -20,9 +20,9 @@
|
||||
#ifndef JIT_H
|
||||
#define JIT_H
|
||||
|
||||
/* When the JIT breakpoint fires, the inferior wants us to take one of these
|
||||
actions. These values are used by the inferior, so the values of these enums
|
||||
cannot be changed. */
|
||||
/* When the JIT breakpoint fires, the inferior wants us to take one of
|
||||
these actions. These values are used by the inferior, so the
|
||||
values of these enums cannot be changed. */
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@ -31,11 +31,12 @@ typedef enum
|
||||
JIT_UNREGISTER
|
||||
} jit_actions_t;
|
||||
|
||||
/* This struct describes a single symbol file in a linked list of symbol files
|
||||
describing generated code. As the inferior generates code, it adds these
|
||||
entries to the list, and when we attach to the inferior, we read them all.
|
||||
For the first element prev_entry should be NULL, and for the last element
|
||||
next_entry should be NULL. */
|
||||
/* This struct describes a single symbol file in a linked list of
|
||||
symbol files describing generated code. As the inferior generates
|
||||
code, it adds these entries to the list, and when we attach to the
|
||||
inferior, we read them all. For the first element prev_entry
|
||||
should be NULL, and for the last element next_entry should be
|
||||
NULL. */
|
||||
|
||||
struct jit_code_entry
|
||||
{
|
||||
@ -46,11 +47,12 @@ struct jit_code_entry
|
||||
};
|
||||
|
||||
/* This is the global descriptor that the inferior uses to communicate
|
||||
information to the debugger. To alert the debugger to take an action, the
|
||||
inferior sets the action_flag to the appropriate enum value, updates
|
||||
relevant_entry to point to the relevant code entry, and calls the function at
|
||||
the well-known symbol with our breakpoint. We then read this descriptor from
|
||||
another global well-known symbol. */
|
||||
information to the debugger. To alert the debugger to take an
|
||||
action, the inferior sets the action_flag to the appropriate enum
|
||||
value, updates relevant_entry to point to the relevant code entry,
|
||||
and calls the function at the well-known symbol with our
|
||||
breakpoint. We then read this descriptor from another global
|
||||
well-known symbol. */
|
||||
|
||||
struct jit_descriptor
|
||||
{
|
||||
@ -62,9 +64,10 @@ struct jit_descriptor
|
||||
CORE_ADDR first_entry;
|
||||
};
|
||||
|
||||
/* Looks for the descriptor and registration symbols and breakpoints the
|
||||
registration function. If it finds both, it registers all the already JITed
|
||||
code. If it has already found the symbols, then it doesn't try again. */
|
||||
/* Looks for the descriptor and registration symbols and breakpoints
|
||||
the registration function. If it finds both, it registers all the
|
||||
already JITed code. If it has already found the symbols, then it
|
||||
doesn't try again. */
|
||||
|
||||
extern void jit_inferior_created_hook (void);
|
||||
|
||||
@ -72,8 +75,8 @@ extern void jit_inferior_created_hook (void);
|
||||
|
||||
extern void jit_breakpoint_re_set (void);
|
||||
|
||||
/* This function is called by handle_inferior_event when it decides that the JIT
|
||||
event breakpoint has fired. */
|
||||
/* This function is called by handle_inferior_event when it decides
|
||||
that the JIT event breakpoint has fired. */
|
||||
|
||||
extern void jit_event_handler (struct gdbarch *gdbarch);
|
||||
|
||||
|
@ -234,7 +234,8 @@ java_class_from_object (struct value *obj_val)
|
||||
static int
|
||||
java_class_is_primitive (struct value *clas)
|
||||
{
|
||||
struct value *vtable = value_struct_elt (&clas, NULL, "vtable", NULL, "struct");
|
||||
struct value *vtable = value_struct_elt (&clas, NULL, "vtable",
|
||||
NULL, "struct");
|
||||
CORE_ADDR i = value_as_address (vtable);
|
||||
|
||||
return (int) (i & 0x7fffffff) == (int) 0x7fffffff;
|
||||
@ -274,7 +275,7 @@ type_from_class (struct gdbarch *gdbarch, struct value *clas)
|
||||
}
|
||||
|
||||
/* Get Class name. */
|
||||
/* if clasloader non-null, prepend loader address. FIXME */
|
||||
/* If clasloader non-null, prepend loader address. FIXME */
|
||||
temp = clas;
|
||||
utf8_name = value_struct_elt (&temp, NULL, "name", NULL, "structure");
|
||||
name = get_java_utf8_name (&objfile->objfile_obstack, utf8_name);
|
||||
@ -305,7 +306,8 @@ type_from_class (struct gdbarch *gdbarch, struct value *clas)
|
||||
temp = clas;
|
||||
/* Set array element type. */
|
||||
temp = value_struct_elt (&temp, NULL, "methods", NULL, "structure");
|
||||
deprecated_set_value_type (temp, lookup_pointer_type (value_type (clas)));
|
||||
deprecated_set_value_type (temp,
|
||||
lookup_pointer_type (value_type (clas)));
|
||||
TYPE_TARGET_TYPE (type) = type_from_class (gdbarch, temp);
|
||||
}
|
||||
|
||||
@ -358,11 +360,13 @@ java_link_class_type (struct gdbarch *gdbarch,
|
||||
ninterfaces = 0;
|
||||
#else
|
||||
temp = clas;
|
||||
ninterfaces = value_as_long (value_struct_elt (&temp, NULL, "interface_len", NULL, "structure"));
|
||||
ninterfaces = value_as_long (value_struct_elt (&temp, NULL, "interface_len",
|
||||
NULL, "structure"));
|
||||
#endif
|
||||
TYPE_N_BASECLASSES (type) = (tsuper == NULL ? 0 : 1) + ninterfaces;
|
||||
temp = clas;
|
||||
nfields = value_as_long (value_struct_elt (&temp, NULL, "field_count", NULL, "structure"));
|
||||
nfields = value_as_long (value_struct_elt (&temp, NULL, "field_count",
|
||||
NULL, "structure"));
|
||||
nfields += TYPE_N_BASECLASSES (type);
|
||||
nfields++; /* Add one for dummy "class" field. */
|
||||
TYPE_NFIELDS (type) = nfields;
|
||||
@ -403,7 +407,8 @@ java_link_class_type (struct gdbarch *gdbarch,
|
||||
else
|
||||
{
|
||||
temp = clas;
|
||||
temp = value_struct_elt (&temp, NULL, "size_in_bytes", NULL, "structure");
|
||||
temp = value_struct_elt (&temp, NULL, "size_in_bytes",
|
||||
NULL, "structure");
|
||||
TYPE_LENGTH (type) = value_as_long (temp);
|
||||
}
|
||||
|
||||
@ -497,7 +502,8 @@ java_link_class_type (struct gdbarch *gdbarch,
|
||||
if (methods == NULL)
|
||||
{
|
||||
temp = clas;
|
||||
methods = value_struct_elt (&temp, NULL, "methods", NULL, "structure");
|
||||
methods = value_struct_elt (&temp, NULL, "methods",
|
||||
NULL, "structure");
|
||||
method = value_ind (methods);
|
||||
}
|
||||
else
|
||||
@ -632,7 +638,8 @@ is_object_type (struct type *type)
|
||||
name = TYPE_TAG_NAME (ttype);
|
||||
if (name != NULL && strcmp (name, "java.lang.Object") == 0)
|
||||
return 1;
|
||||
name = TYPE_NFIELDS (ttype) > 0 ? TYPE_FIELD_NAME (ttype, 0) : (char *) 0;
|
||||
name
|
||||
= TYPE_NFIELDS (ttype) > 0 ? TYPE_FIELD_NAME (ttype, 0) : (char *) 0;
|
||||
if (name != NULL && strcmp (name, "vtable") == 0)
|
||||
{
|
||||
if (java_object_type == NULL)
|
||||
@ -767,7 +774,8 @@ java_demangled_signature_length (char *signature)
|
||||
}
|
||||
}
|
||||
|
||||
/* Demangle the Java type signature SIGNATURE, leaving the result in RESULT. */
|
||||
/* Demangle the Java type signature SIGNATURE, leaving the result in
|
||||
RESULT. */
|
||||
|
||||
static void
|
||||
java_demangled_signature_copy (char *result, char *signature)
|
||||
|
@ -69,8 +69,8 @@ extern struct type *java_lookup_class (char *);
|
||||
extern int is_object_type (struct type *);
|
||||
|
||||
/* Defined in jv-typeprint.c */
|
||||
extern void java_print_type (struct type *, const char *, struct ui_file *, int,
|
||||
int);
|
||||
extern void java_print_type (struct type *, const char *,
|
||||
struct ui_file *, int, int);
|
||||
|
||||
extern char *java_demangle_type_signature (char *);
|
||||
|
||||
|
@ -202,7 +202,7 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show,
|
||||
if (len)
|
||||
fprintf_filtered (stream, "\n");
|
||||
|
||||
/* Print out the methods */
|
||||
/* Print out the methods. */
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
@ -346,7 +346,7 @@ java_print_type (struct type *type, const char *varstring,
|
||||
}
|
||||
|
||||
/* For demangled function names, we have the arglist as part of the name,
|
||||
so don't print an additional pair of ()'s */
|
||||
so don't print an additional pair of ()'s. */
|
||||
|
||||
demangled_args = varstring != NULL && strchr (varstring, '(') != NULL;
|
||||
c_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
|
||||
|
@ -53,7 +53,7 @@ java_value_print (struct value *val, struct ui_file *stream,
|
||||
{
|
||||
CORE_ADDR obj_addr;
|
||||
|
||||
/* Get the run-time type, and cast the object into that */
|
||||
/* Get the run-time type, and cast the object into that. */
|
||||
|
||||
obj_addr = unpack_pointer (type, value_contents (val));
|
||||
|
||||
@ -89,7 +89,7 @@ java_value_print (struct value *val, struct ui_file *stream,
|
||||
if (el_type == NULL)
|
||||
{
|
||||
CORE_ADDR element;
|
||||
CORE_ADDR next_element = -1; /* dummy initial value */
|
||||
CORE_ADDR next_element = -1; /* Dummy initial value. */
|
||||
|
||||
/* Skip object header and length. */
|
||||
address += get_java_object_header_size (gdbarch) + 4;
|
||||
@ -177,7 +177,8 @@ java_value_print (struct value *val, struct ui_file *stream,
|
||||
for (reps = 1; i + reps < length; reps++)
|
||||
{
|
||||
set_value_lazy (next_v, 1);
|
||||
set_value_offset (next_v, value_offset (next_v) + TYPE_LENGTH (el_type));
|
||||
set_value_offset (next_v, value_offset (next_v)
|
||||
+ TYPE_LENGTH (el_type));
|
||||
if (memcmp (value_contents (v), value_contents (next_v),
|
||||
TYPE_LENGTH (el_type)) != 0)
|
||||
break;
|
||||
@ -205,7 +206,7 @@ java_value_print (struct value *val, struct ui_file *stream,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* If it's type String, print it */
|
||||
/* If it's type String, print it. */
|
||||
|
||||
if (TYPE_CODE (type) == TYPE_CODE_PTR
|
||||
&& TYPE_TARGET_TYPE (type)
|
||||
@ -225,7 +226,7 @@ java_value_print (struct value *val, struct ui_file *stream,
|
||||
unsigned long count;
|
||||
struct value *mark;
|
||||
|
||||
mark = value_mark (); /* Remember start of new values */
|
||||
mark = value_mark (); /* Remember start of new values. */
|
||||
|
||||
data_val = value_struct_elt (&val, NULL, "data", NULL, NULL);
|
||||
data = value_as_address (data_val);
|
||||
@ -236,7 +237,7 @@ java_value_print (struct value *val, struct ui_file *stream,
|
||||
count_val = value_struct_elt (&val, NULL, "count", NULL, NULL);
|
||||
count = value_as_address (count_val);
|
||||
|
||||
value_free_to_mark (mark); /* Release unnecessary values */
|
||||
value_free_to_mark (mark); /* Release unnecessary values. */
|
||||
|
||||
char_type = builtin_java_type (gdbarch)->builtin_char;
|
||||
val_print_string (char_type, NULL, data + boffset, count, stream,
|
||||
@ -486,7 +487,7 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
|
||||
const struct value_print_options *options)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_type_arch (type);
|
||||
unsigned int i = 0; /* Number of characters printed */
|
||||
unsigned int i = 0; /* Number of characters printed. */
|
||||
struct type *target_type;
|
||||
CORE_ADDR addr;
|
||||
|
||||
@ -507,7 +508,8 @@ java_val_print (struct type *type, const gdb_byte *valaddr,
|
||||
-fvtable_thunks. (Otherwise, look under TYPE_CODE_STRUCT.) */
|
||||
/* Extract an address, assume that it is unsigned. */
|
||||
print_address_demangle (gdbarch,
|
||||
extract_unsigned_integer (valaddr, TYPE_LENGTH (type)),
|
||||
extract_unsigned_integer (valaddr,
|
||||
TYPE_LENGTH (type)),
|
||||
stream, demangle);
|
||||
break;
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ enum type_check type_check = type_check_off;
|
||||
enum case_mode case_mode = case_mode_auto;
|
||||
enum case_sensitivity case_sensitivity = case_sensitive_on;
|
||||
|
||||
/* The current language and language_mode (see language.h) */
|
||||
/* The current language and language_mode (see language.h). */
|
||||
|
||||
const struct language_defn *current_language = &unknown_language_defn;
|
||||
enum language_mode language_mode = language_mode_auto;
|
||||
@ -125,7 +125,7 @@ static void
|
||||
show_language_command (struct ui_file *file, int from_tty,
|
||||
struct cmd_list_element *c, const char *value)
|
||||
{
|
||||
enum language flang; /* The language of the current frame */
|
||||
enum language flang; /* The language of the current frame. */
|
||||
|
||||
if (language_mode == language_mode_auto)
|
||||
fprintf_filtered (gdb_stdout,
|
||||
@ -422,7 +422,8 @@ set_type_range_case (void)
|
||||
case_sensitivity = current_language->la_case_sensitivity;
|
||||
}
|
||||
|
||||
/* Set current language to (enum language) LANG. Returns previous language. */
|
||||
/* Set current language to (enum language) LANG. Returns previous
|
||||
language. */
|
||||
|
||||
enum language
|
||||
set_language (enum language lang)
|
||||
@ -574,14 +575,14 @@ ordered_type (struct type *type)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns non-zero if the two types are the same */
|
||||
/* Returns non-zero if the two types are the same. */
|
||||
int
|
||||
same_type (struct type *arg1, struct type *arg2)
|
||||
{
|
||||
CHECK_TYPEDEF (type);
|
||||
if (structured_type (arg1)
|
||||
? !structured_type (arg2) : structured_type (arg2))
|
||||
/* One is structured and one isn't */
|
||||
/* One is structured and one isn't. */
|
||||
return 0;
|
||||
else if (structured_type (arg1) && structured_type (arg2))
|
||||
return arg1 == arg2;
|
||||
@ -593,7 +594,7 @@ same_type (struct type *arg1, struct type *arg2)
|
||||
return arg1 == arg2;
|
||||
}
|
||||
|
||||
/* Returns non-zero if the type is integral */
|
||||
/* Returns non-zero if the type is integral. */
|
||||
int
|
||||
integral_type (struct type *type)
|
||||
{
|
||||
@ -614,7 +615,7 @@ integral_type (struct type *type)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns non-zero if the value is numeric */
|
||||
/* Returns non-zero if the value is numeric. */
|
||||
int
|
||||
numeric_type (struct type *type)
|
||||
{
|
||||
@ -630,7 +631,7 @@ numeric_type (struct type *type)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns non-zero if the value is a character type */
|
||||
/* Returns non-zero if the value is a character type. */
|
||||
int
|
||||
character_type (struct type *type)
|
||||
{
|
||||
@ -653,7 +654,7 @@ character_type (struct type *type)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns non-zero if the value is a string type */
|
||||
/* Returns non-zero if the value is a string type. */
|
||||
int
|
||||
string_type (struct type *type)
|
||||
{
|
||||
@ -675,7 +676,7 @@ string_type (struct type *type)
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns non-zero if the value is a boolean type */
|
||||
/* Returns non-zero if the value is a boolean type. */
|
||||
int
|
||||
boolean_type (struct type *type)
|
||||
{
|
||||
@ -699,7 +700,7 @@ boolean_type (struct type *type)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns non-zero if the value is a floating-point type */
|
||||
/* Returns non-zero if the value is a floating-point type. */
|
||||
int
|
||||
float_type (struct type *type)
|
||||
{
|
||||
@ -708,7 +709,7 @@ float_type (struct type *type)
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Returns non-zero if the value is a pointer type */
|
||||
/* Returns non-zero if the value is a pointer type. */
|
||||
int
|
||||
pointer_type (struct type *type)
|
||||
{
|
||||
@ -717,7 +718,7 @@ pointer_type (struct type *type)
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Returns non-zero if the value is a structured type */
|
||||
/* Returns non-zero if the value is a structured type. */
|
||||
int
|
||||
structured_type (struct type *type)
|
||||
{
|
||||
@ -826,7 +827,7 @@ range_error (const char *string,...)
|
||||
}
|
||||
|
||||
|
||||
/* This page contains miscellaneous functions */
|
||||
/* This page contains miscellaneous functions. */
|
||||
|
||||
/* Return the language enum for a given language string. */
|
||||
|
||||
@ -859,7 +860,7 @@ language_def (enum language lang)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Return the language as a string */
|
||||
/* Return the language as a string. */
|
||||
char *
|
||||
language_str (enum language lang)
|
||||
{
|
||||
@ -1013,7 +1014,7 @@ language_demangle (const struct language_defn *current_language,
|
||||
|
||||
/* Return class name from physname or NULL. */
|
||||
char *
|
||||
language_class_name_from_physname (const struct language_defn *current_language,
|
||||
language_class_name_from_physname (const struct language_defn *curr_language,
|
||||
const char *physname)
|
||||
{
|
||||
if (current_language != NULL
|
||||
@ -1203,7 +1204,8 @@ const struct language_defn unknown_language_defn =
|
||||
LANG_MAGIC
|
||||
};
|
||||
|
||||
/* These two structs define fake entries for the "local" and "auto" options. */
|
||||
/* These two structs define fake entries for the "local" and "auto"
|
||||
options. */
|
||||
const struct language_defn auto_language_defn =
|
||||
{
|
||||
"auto",
|
||||
@ -1364,7 +1366,7 @@ language_lookup_primitive_type_by_name (const struct language_defn *la,
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
/* Initialize the language routines */
|
||||
/* Initialize the language routines. */
|
||||
|
||||
void
|
||||
_initialize_language (void)
|
||||
@ -1378,7 +1380,7 @@ _initialize_language (void)
|
||||
language_gdbarch_data
|
||||
= gdbarch_data_register_post_init (language_gdbarch_post_init);
|
||||
|
||||
/* GDB commands for language specific stuff */
|
||||
/* GDB commands for language specific stuff. */
|
||||
|
||||
add_prefix_cmd ("check", no_class, set_check,
|
||||
_("Set the status of the type/range checker."),
|
||||
@ -1425,6 +1427,6 @@ For Fortran the default is off; for other languages the default is on."),
|
||||
range = xstrdup ("auto");
|
||||
case_sensitive = xstrdup ("auto");
|
||||
|
||||
/* Have the above take effect */
|
||||
/* Have the above take effect. */
|
||||
set_language (language_auto);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#if !defined (LANGUAGE_H)
|
||||
#define LANGUAGE_H 1
|
||||
|
||||
/* Forward decls for prototypes */
|
||||
/* Forward decls for prototypes. */
|
||||
struct value;
|
||||
struct objfile;
|
||||
struct frame_info;
|
||||
@ -32,7 +32,7 @@ struct expression;
|
||||
struct ui_file;
|
||||
struct value_print_options;
|
||||
|
||||
#define MAX_FORTRAN_DIMS 7 /* Maximum number of F77 array dims */
|
||||
#define MAX_FORTRAN_DIMS 7 /* Maximum number of F77 array dims. */
|
||||
|
||||
/* range_mode ==
|
||||
range_mode_auto: range_check set automatically to default of language.
|
||||
@ -56,7 +56,7 @@ extern enum range_check
|
||||
range_check;
|
||||
|
||||
/* type_mode ==
|
||||
type_mode_auto: type_check set automatically to default of language
|
||||
type_mode_auto: type_check set automatically to default of language.
|
||||
type_mode_manual: type_check set manually by user. */
|
||||
|
||||
extern enum type_mode
|
||||
@ -77,7 +77,7 @@ extern enum type_check
|
||||
type_check;
|
||||
|
||||
/* case_mode ==
|
||||
case_mode_auto: case_sensitivity set upon selection of scope
|
||||
case_mode_auto: case_sensitivity set upon selection of scope.
|
||||
case_mode_manual: case_sensitivity set only by user. */
|
||||
|
||||
extern enum case_mode
|
||||
@ -87,8 +87,8 @@ extern enum case_mode
|
||||
case_mode;
|
||||
|
||||
/* array_ordering ==
|
||||
array_row_major: Arrays are in row major order
|
||||
array_column_major: Arrays are in column major order.*/
|
||||
array_row_major: Arrays are in row major order.
|
||||
array_column_major: Arrays are in column major order. */
|
||||
|
||||
extern enum array_ordering
|
||||
{
|
||||
@ -98,8 +98,8 @@ array_ordering;
|
||||
|
||||
|
||||
/* case_sensitivity ==
|
||||
case_sensitive_on: Case sensitivity in name matching is used
|
||||
case_sensitive_off: Case sensitivity in name matching is not used */
|
||||
case_sensitive_on: Case sensitivity in name matching is used.
|
||||
case_sensitive_off: Case sensitivity in name matching is not used. */
|
||||
|
||||
extern enum case_sensitivity
|
||||
{
|
||||
@ -109,8 +109,8 @@ case_sensitivity;
|
||||
|
||||
|
||||
/* macro_expansion ==
|
||||
macro_expansion_no: No macro expansion is available
|
||||
macro_expansion_c: C-like macro expansion is available */
|
||||
macro_expansion_no: No macro expansion is available.
|
||||
macro_expansion_c: C-like macro expansion is available. */
|
||||
|
||||
enum macro_expansion
|
||||
{
|
||||
@ -140,33 +140,33 @@ struct language_arch_info
|
||||
|
||||
struct language_defn
|
||||
{
|
||||
/* Name of the language */
|
||||
/* Name of the language. */
|
||||
|
||||
char *la_name;
|
||||
|
||||
/* its symtab language-enum (defs.h) */
|
||||
/* its symtab language-enum (defs.h). */
|
||||
|
||||
enum language la_language;
|
||||
|
||||
/* Default range checking */
|
||||
/* Default range checking. */
|
||||
|
||||
enum range_check la_range_check;
|
||||
|
||||
/* Default type checking */
|
||||
/* Default type checking. */
|
||||
|
||||
enum type_check la_type_check;
|
||||
|
||||
/* Default case sensitivity */
|
||||
/* Default case sensitivity. */
|
||||
enum case_sensitivity la_case_sensitivity;
|
||||
|
||||
/* Multi-dimensional array ordering */
|
||||
/* Multi-dimensional array ordering. */
|
||||
enum array_ordering la_array_ordering;
|
||||
|
||||
/* Style of macro expansion, if any, supported by this language. */
|
||||
enum macro_expansion la_macro_expansion;
|
||||
|
||||
/* Definitions related to expression printing, prefixifying, and
|
||||
dumping */
|
||||
dumping. */
|
||||
|
||||
const struct exp_descriptor *la_exp_desc;
|
||||
|
||||
@ -174,7 +174,7 @@ struct language_defn
|
||||
|
||||
int (*la_parser) (void);
|
||||
|
||||
/* Parser error function */
|
||||
/* Parser error function. */
|
||||
|
||||
void (*la_error) (char *);
|
||||
|
||||
@ -272,7 +272,7 @@ struct language_defn
|
||||
/* Return class name of a mangled method name or NULL. */
|
||||
char *(*la_class_name_from_physname) (const char *physname);
|
||||
|
||||
/* Table for printing expressions */
|
||||
/* Table for printing expressions. */
|
||||
|
||||
const struct op_print *la_op_print_tab;
|
||||
|
||||
@ -319,7 +319,7 @@ struct language_defn
|
||||
struct type **chartype, const char **charset);
|
||||
|
||||
/* Add fields above this point, so the magic number is always last. */
|
||||
/* Magic number for compat checking */
|
||||
/* Magic number for compat checking. */
|
||||
|
||||
long la_magic;
|
||||
|
||||
@ -381,8 +381,8 @@ struct type *language_lookup_primitive_type_by_name (const struct language_defn
|
||||
/* Should we range check values against the domain of their type? */
|
||||
#define RANGE_CHECK (range_check != range_check_off)
|
||||
|
||||
/* "cast" really means conversion */
|
||||
/* FIXME -- should be a setting in language_defn */
|
||||
/* "cast" really means conversion. */
|
||||
/* FIXME -- should be a setting in language_defn. */
|
||||
#define CAST_IS_CONVERSION(LANG) ((LANG)->la_language == language_c || \
|
||||
(LANG)->la_language == language_cplus || \
|
||||
(LANG)->la_language == language_objc)
|
||||
@ -455,8 +455,8 @@ extern int pointer_type (struct type *);
|
||||
|
||||
extern int structured_type (struct type *);
|
||||
|
||||
/* Checks Binary and Unary operations for semantic type correctness */
|
||||
/* FIXME: Does not appear to be used */
|
||||
/* Checks Binary and Unary operations for semantic type correctness. */
|
||||
/* FIXME: Does not appear to be used. */
|
||||
#define unop_type_check(v,o) binop_type_check((v),NULL,(o))
|
||||
|
||||
extern void binop_type_check (struct value *, struct value *, int);
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
extern char *operator_chars (char *, char **);
|
||||
|
||||
/* Prototypes for local functions */
|
||||
/* Prototypes for local functions. */
|
||||
|
||||
static void initialize_defaults (struct symtab **default_symtab,
|
||||
int *default_line);
|
||||
@ -321,7 +321,7 @@ add_matching_methods (int method_counter, struct type *t,
|
||||
else
|
||||
{
|
||||
/* This error message gets printed, but the method
|
||||
still seems to be found
|
||||
still seems to be found.
|
||||
fputs_filtered("(Cannot find method ", gdb_stdout);
|
||||
fprintf_symbol_filtered (gdb_stdout, phys_name,
|
||||
language_cplus,
|
||||
@ -863,7 +863,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
|
||||
}
|
||||
else if (is_objc_method)
|
||||
{
|
||||
/* allow word separators in method names for Obj-C */
|
||||
/* allow word separators in method names for Obj-C. */
|
||||
p = skip_quoted_chars (*argptr, NULL, "");
|
||||
}
|
||||
else
|
||||
@ -871,7 +871,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
|
||||
p = skip_quoted (*argptr);
|
||||
}
|
||||
|
||||
/* Keep any template parameters */
|
||||
/* Keep any template parameters. */
|
||||
if (*p == '<')
|
||||
p = find_template_name_end (p);
|
||||
|
||||
@ -879,7 +879,7 @@ decode_line_1 (char **argptr, int funfirstline, struct symtab *default_symtab,
|
||||
if (*p == '(')
|
||||
p = find_method_overload_end (p);
|
||||
|
||||
/* Make sure we keep important kewords like "const" */
|
||||
/* Make sure we keep important kewords like "const". */
|
||||
if (strncmp (p, " const", 6) == 0)
|
||||
p += 6;
|
||||
|
||||
@ -1058,7 +1058,7 @@ locate_first_half (char **argptr, int *is_quote_enclosed)
|
||||
p = temp_end;
|
||||
}
|
||||
/* Check for a colon and a plus or minus and a [ (which
|
||||
indicates an Objective-C method) */
|
||||
indicates an Objective-C method). */
|
||||
if (is_objc_method_format (p))
|
||||
{
|
||||
break;
|
||||
@ -1147,7 +1147,8 @@ decode_objc (char **argptr, int funfirstline, struct symtab *file_symtab,
|
||||
|
||||
if (i1 > 0)
|
||||
{
|
||||
sym_arr = (struct symbol **) alloca ((i1 + 1) * sizeof (struct symbol *));
|
||||
sym_arr = (struct symbol **)
|
||||
alloca ((i1 + 1) * sizeof (struct symbol *));
|
||||
sym_arr[i1] = NULL;
|
||||
|
||||
copy = find_imps (file_symtab, block, *argptr, sym_arr, &i1, &i2);
|
||||
@ -1270,7 +1271,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
p2 -> "::inA::fun". */
|
||||
|
||||
/* In the loop below, with these strings, we'll make 2 passes, each
|
||||
is marked in comments.*/
|
||||
is marked in comments. */
|
||||
|
||||
while (1)
|
||||
{
|
||||
@ -1318,7 +1319,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
break; /* Out of the while (1). This would happen
|
||||
for instance if we have looked up
|
||||
unsuccessfully all the components of the
|
||||
string, and p->""(PASS2) */
|
||||
string, and p->""(PASS2). */
|
||||
|
||||
/* We get here if p points to ' ', '\t', '\'', "::" or ""(i.e
|
||||
string ended). */
|
||||
@ -1380,7 +1381,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
p += cp_validate_operator (p - 8) - 8;
|
||||
}
|
||||
|
||||
/* Keep any template parameters */
|
||||
/* Keep any template parameters. */
|
||||
if (*p == '<')
|
||||
p = find_template_name_end (p);
|
||||
|
||||
@ -1389,7 +1390,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
if (a != NULL)
|
||||
p = find_method_overload_end (a);
|
||||
|
||||
/* Make sure we keep important kewords like "const" */
|
||||
/* Make sure we keep important kewords like "const". */
|
||||
if (strncmp (p, " const", 6) == 0)
|
||||
p += 6;
|
||||
|
||||
@ -1429,7 +1430,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
copy[p - *argptr - 1]) != NULL)
|
||||
copy[p - *argptr - 1] = '\0';
|
||||
|
||||
/* At this point copy->"fun", p->"" */
|
||||
/* At this point copy->"fun", p->"". */
|
||||
|
||||
/* No line number may be specified. */
|
||||
while (*p == ' ' || *p == '\t')
|
||||
@ -1465,7 +1466,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
}
|
||||
}
|
||||
return values;
|
||||
} /* End if symbol found */
|
||||
} /* End if symbol found. */
|
||||
|
||||
|
||||
/* We couldn't find a class, so we're in case 2 above. We check the
|
||||
@ -1479,7 +1480,7 @@ decode_compound (char **argptr, int funfirstline, char ***canonical,
|
||||
/* Set argptr to skip over the name. */
|
||||
*argptr = (*p == '\'') ? p + 1 : p;
|
||||
|
||||
/* Look up entire name */
|
||||
/* Look up entire name. */
|
||||
sym = lookup_symbol (copy, 0, VAR_DOMAIN, 0);
|
||||
if (sym)
|
||||
return symbol_found (funfirstline, canonical, copy, sym, NULL);
|
||||
@ -1525,7 +1526,7 @@ lookup_prefix_sym (char **argptr, char *p)
|
||||
*argptr = p;
|
||||
|
||||
/* At this point p1->"::inA::fun", p->"inA::fun" copy->"AAA",
|
||||
argptr->"inA::fun" */
|
||||
argptr->"inA::fun". */
|
||||
|
||||
sym = lookup_symbol (copy, 0, STRUCT_DOMAIN, 0);
|
||||
if (sym == NULL)
|
||||
@ -1942,7 +1943,7 @@ symbol_found (int funfirstline, char ***canonical, char *copy,
|
||||
|
||||
if (SYMBOL_CLASS (sym) == LOC_BLOCK)
|
||||
{
|
||||
/* Arg is the name of a function */
|
||||
/* Arg is the name of a function. */
|
||||
values.sals = (struct symtab_and_line *)
|
||||
xmalloc (sizeof (struct symtab_and_line));
|
||||
values.sals[0] = find_function_start_sal (sym, funfirstline);
|
||||
|
@ -49,7 +49,7 @@ struct fork_info
|
||||
struct fork_info *next;
|
||||
ptid_t ptid;
|
||||
ptid_t parent_ptid;
|
||||
int num; /* Convenient handle (GDB fork id) */
|
||||
int num; /* Convenient handle (GDB fork id). */
|
||||
struct regcache *savedregs; /* Convenient for info fork, saves
|
||||
having to actually switch contexts. */
|
||||
int clobber_regs; /* True if we should restore saved regs. */
|
||||
|
@ -167,7 +167,7 @@ blocked. */
|
||||
#define PTRACE_SETOPTIONS 0x4200
|
||||
#define PTRACE_GETEVENTMSG 0x4201
|
||||
|
||||
/* options set using PTRACE_SETOPTIONS */
|
||||
/* Options set using PTRACE_SETOPTIONS. */
|
||||
#define PTRACE_O_TRACESYSGOOD 0x00000001
|
||||
#define PTRACE_O_TRACEFORK 0x00000002
|
||||
#define PTRACE_O_TRACEVFORK 0x00000004
|
||||
@ -297,7 +297,7 @@ static int linux_supports_tracesysgood_flag = -1;
|
||||
|
||||
static int linux_supports_tracevforkdone_flag = -1;
|
||||
|
||||
/* Async mode support */
|
||||
/* Async mode support. */
|
||||
|
||||
/* Zero if the async mode, although enabled, is masked, which means
|
||||
linux_nat_wait should behave as if async mode was off. */
|
||||
@ -4569,7 +4569,7 @@ linux_nat_info_proc_cmd (char *args, int from_tty)
|
||||
}
|
||||
else
|
||||
{
|
||||
/* [...] (future options here) */
|
||||
/* [...] (future options here). */
|
||||
}
|
||||
argv++;
|
||||
}
|
||||
|
@ -864,8 +864,7 @@ thread_db_load_search (void)
|
||||
}
|
||||
|
||||
/* Attempt to load and initialize libthread_db.
|
||||
Return 1 on success.
|
||||
*/
|
||||
Return 1 on success. */
|
||||
|
||||
static int
|
||||
thread_db_load (void)
|
||||
|
@ -172,7 +172,8 @@ lm32_analyze_prologue (struct gdbarch *gdbarch,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Any other instruction is likely not to be part of the prologue. */
|
||||
/* Any other instruction is likely not to be part of the
|
||||
prologue. */
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -336,8 +337,8 @@ lm32_extract_return_value (struct type *type, struct regcache *regcache,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Aggregate types greater than a single register are returned in memory.
|
||||
FIXME: Unless they are only 2 regs?. */
|
||||
/* Aggregate types greater than a single register are returned
|
||||
in memory. FIXME: Unless they are only 2 regs?. */
|
||||
regcache_cooked_read_unsigned (regcache, SIM_LM32_R1_REGNUM, &l);
|
||||
return_buffer = l;
|
||||
read_memory (return_buffer, valbuf, TYPE_LENGTH (type));
|
||||
@ -463,7 +464,8 @@ lm32_frame_cache (struct frame_info *this_frame, void **this_prologue_cache)
|
||||
converted into a request for the RA register. */
|
||||
info->saved_regs[SIM_LM32_PC_REGNUM] = info->saved_regs[SIM_LM32_RA_REGNUM];
|
||||
|
||||
/* The previous frame's SP needed to be computed. Save the computed value. */
|
||||
/* The previous frame's SP needed to be computed. Save the computed
|
||||
value. */
|
||||
trad_frame_set_value (info->saved_regs, SIM_LM32_SP_REGNUM, prev_sp);
|
||||
|
||||
return info;
|
||||
|
Loading…
Reference in New Issue
Block a user