mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
C++ keyword cleanliness, mostly auto-generated
This patch renames symbols that happen to have names which are reserved keywords in C++. Most of this was generated with Tromey's cxx-conversion.el script. Some places where later hand massaged a bit, to fix formatting, etc. And this was rebased several times meanwhile, along with re-running the script, so re-running the script from scratch probably does not result in the exact same output. I don't think that matters anyway. gdb/ 2015-02-27 Tom Tromey <tromey@redhat.com> Pedro Alves <palves@redhat.com> Rename symbols whose names are reserved C++ keywords throughout. gdb/gdbserver/ 2015-02-27 Tom Tromey <tromey@redhat.com> Pedro Alves <palves@redhat.com> Rename symbols whose names are reserved C++ keywords throughout.
This commit is contained in:
parent
3bc3d82a00
commit
fe978cb071
@ -1,3 +1,8 @@
|
||||
2015-02-27 Tom Tromey <tromey@redhat.com>
|
||||
Pedro Alves <palves@redhat.com>
|
||||
|
||||
Rename symbols whose names are reserved C++ keywords throughout.
|
||||
|
||||
2015-02-27 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* Makefile.in (COMPILER): New, get it from autoconf.
|
||||
|
@ -274,7 +274,7 @@ struct cache_entry
|
||||
/* The name used to perform the lookup. */
|
||||
const char *name;
|
||||
/* The namespace used during the lookup. */
|
||||
domain_enum namespace;
|
||||
domain_enum domain;
|
||||
/* The symbol returned by the lookup, or NULL if no matching symbol
|
||||
was found. */
|
||||
struct symbol *sym;
|
||||
@ -4426,11 +4426,11 @@ ada_clear_symbol_cache (void)
|
||||
ada_init_symbol_cache (sym_cache);
|
||||
}
|
||||
|
||||
/* Search our cache for an entry matching NAME and NAMESPACE.
|
||||
/* Search our cache for an entry matching NAME and DOMAIN.
|
||||
Return it if found, or NULL otherwise. */
|
||||
|
||||
static struct cache_entry **
|
||||
find_entry (const char *name, domain_enum namespace)
|
||||
find_entry (const char *name, domain_enum domain)
|
||||
{
|
||||
struct ada_symbol_cache *sym_cache
|
||||
= ada_get_symbol_cache (current_program_space);
|
||||
@ -4439,23 +4439,23 @@ find_entry (const char *name, domain_enum namespace)
|
||||
|
||||
for (e = &sym_cache->root[h]; *e != NULL; e = &(*e)->next)
|
||||
{
|
||||
if (namespace == (*e)->namespace && strcmp (name, (*e)->name) == 0)
|
||||
if (domain == (*e)->domain && strcmp (name, (*e)->name) == 0)
|
||||
return e;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Search the symbol cache for an entry matching NAME and NAMESPACE.
|
||||
/* Search the symbol cache for an entry matching NAME and DOMAIN.
|
||||
Return 1 if found, 0 otherwise.
|
||||
|
||||
If an entry was found and SYM is not NULL, set *SYM to the entry's
|
||||
SYM. Same principle for BLOCK if not NULL. */
|
||||
|
||||
static int
|
||||
lookup_cached_symbol (const char *name, domain_enum namespace,
|
||||
lookup_cached_symbol (const char *name, domain_enum domain,
|
||||
struct symbol **sym, const struct block **block)
|
||||
{
|
||||
struct cache_entry **e = find_entry (name, namespace);
|
||||
struct cache_entry **e = find_entry (name, domain);
|
||||
|
||||
if (e == NULL)
|
||||
return 0;
|
||||
@ -4467,10 +4467,10 @@ lookup_cached_symbol (const char *name, domain_enum namespace,
|
||||
}
|
||||
|
||||
/* Assuming that (SYM, BLOCK) is the result of the lookup of NAME
|
||||
in domain NAMESPACE, save this result in our symbol cache. */
|
||||
in domain DOMAIN, save this result in our symbol cache. */
|
||||
|
||||
static void
|
||||
cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
|
||||
cache_symbol (const char *name, domain_enum domain, struct symbol *sym,
|
||||
const struct block *block)
|
||||
{
|
||||
struct ada_symbol_cache *sym_cache
|
||||
@ -4503,7 +4503,7 @@ cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
|
||||
e->name = copy = obstack_alloc (&sym_cache->cache_space, strlen (name) + 1);
|
||||
strcpy (copy, name);
|
||||
e->sym = sym;
|
||||
e->namespace = namespace;
|
||||
e->domain = domain;
|
||||
e->block = block;
|
||||
}
|
||||
|
||||
@ -4725,7 +4725,7 @@ ada_lookup_simple_minsym (const char *name)
|
||||
|
||||
static void
|
||||
add_symbols_from_enclosing_procs (struct obstack *obstackp,
|
||||
const char *name, domain_enum namespace,
|
||||
const char *name, domain_enum domain,
|
||||
int wild_match_p)
|
||||
{
|
||||
}
|
||||
@ -5404,7 +5404,7 @@ add_nonlocal_symbols (struct obstack *obstackp, const char *name,
|
||||
|
||||
static int
|
||||
ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
|
||||
domain_enum namespace,
|
||||
domain_enum domain,
|
||||
struct ada_symbol_info **results,
|
||||
int full_search)
|
||||
{
|
||||
@ -5443,7 +5443,7 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
|
||||
if (full_search)
|
||||
{
|
||||
ada_add_local_symbols (&symbol_list_obstack, name, block,
|
||||
namespace, wild_match_p);
|
||||
domain, wild_match_p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5451,7 +5451,7 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
|
||||
ada_iterate_over_symbols, and we don't want to search
|
||||
superblocks. */
|
||||
ada_add_block_symbols (&symbol_list_obstack, block, name,
|
||||
namespace, NULL, wild_match_p);
|
||||
domain, NULL, wild_match_p);
|
||||
}
|
||||
if (num_defns_collected (&symbol_list_obstack) > 0 || !full_search)
|
||||
goto done;
|
||||
@ -5461,7 +5461,7 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
|
||||
already performed this search before. If we have, then return
|
||||
the same result. */
|
||||
|
||||
if (lookup_cached_symbol (name0, namespace, &sym, &block))
|
||||
if (lookup_cached_symbol (name0, domain, &sym, &block))
|
||||
{
|
||||
if (sym != NULL)
|
||||
add_defn_to_vec (&symbol_list_obstack, sym, block);
|
||||
@ -5472,14 +5472,14 @@ ada_lookup_symbol_list_worker (const char *name0, const struct block *block0,
|
||||
|
||||
/* Search symbols from all global blocks. */
|
||||
|
||||
add_nonlocal_symbols (&symbol_list_obstack, name, namespace, 1,
|
||||
add_nonlocal_symbols (&symbol_list_obstack, name, domain, 1,
|
||||
wild_match_p);
|
||||
|
||||
/* Now add symbols from all per-file blocks if we've gotten no hits
|
||||
(not strictly correct, but perhaps better than an error). */
|
||||
|
||||
if (num_defns_collected (&symbol_list_obstack) == 0)
|
||||
add_nonlocal_symbols (&symbol_list_obstack, name, namespace, 0,
|
||||
add_nonlocal_symbols (&symbol_list_obstack, name, domain, 0,
|
||||
wild_match_p);
|
||||
|
||||
done:
|
||||
@ -5489,10 +5489,10 @@ done:
|
||||
ndefns = remove_extra_symbols (*results, ndefns);
|
||||
|
||||
if (ndefns == 0 && full_search && syms_from_global_search)
|
||||
cache_symbol (name0, namespace, NULL, NULL);
|
||||
cache_symbol (name0, domain, NULL, NULL);
|
||||
|
||||
if (ndefns == 1 && full_search && syms_from_global_search)
|
||||
cache_symbol (name0, namespace, (*results)[0].sym, (*results)[0].block);
|
||||
cache_symbol (name0, domain, (*results)[0].sym, (*results)[0].block);
|
||||
|
||||
ndefns = remove_irrelevant_renamings (*results, ndefns, block0);
|
||||
|
||||
@ -5564,7 +5564,7 @@ ada_name_for_lookup (const char *name)
|
||||
|
||||
void
|
||||
ada_lookup_encoded_symbol (const char *name, const struct block *block,
|
||||
domain_enum namespace,
|
||||
domain_enum domain,
|
||||
struct ada_symbol_info *info)
|
||||
{
|
||||
struct ada_symbol_info *candidates;
|
||||
@ -5573,7 +5573,7 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block,
|
||||
gdb_assert (info != NULL);
|
||||
memset (info, 0, sizeof (struct ada_symbol_info));
|
||||
|
||||
n_candidates = ada_lookup_symbol_list (name, block, namespace, &candidates);
|
||||
n_candidates = ada_lookup_symbol_list (name, block, domain, &candidates);
|
||||
if (n_candidates == 0)
|
||||
return;
|
||||
|
||||
@ -5589,7 +5589,7 @@ ada_lookup_encoded_symbol (const char *name, const struct block *block,
|
||||
|
||||
struct symbol *
|
||||
ada_lookup_symbol (const char *name, const struct block *block0,
|
||||
domain_enum namespace, int *is_a_field_of_this)
|
||||
domain_enum domain, int *is_a_field_of_this)
|
||||
{
|
||||
struct ada_symbol_info info;
|
||||
|
||||
@ -5597,7 +5597,7 @@ ada_lookup_symbol (const char *name, const struct block *block0,
|
||||
*is_a_field_of_this = 0;
|
||||
|
||||
ada_lookup_encoded_symbol (ada_encode (ada_fold_name (name)),
|
||||
block0, namespace, &info);
|
||||
block0, domain, &info);
|
||||
return info.sym;
|
||||
}
|
||||
|
||||
@ -7790,17 +7790,17 @@ struct type *
|
||||
ada_find_parallel_type (struct type *type, const char *suffix)
|
||||
{
|
||||
char *name;
|
||||
const char *typename = ada_type_name (type);
|
||||
const char *type_name = ada_type_name (type);
|
||||
int len;
|
||||
|
||||
if (typename == NULL)
|
||||
if (type_name == NULL)
|
||||
return NULL;
|
||||
|
||||
len = strlen (typename);
|
||||
len = strlen (type_name);
|
||||
|
||||
name = (char *) alloca (len + strlen (suffix) + 1);
|
||||
|
||||
strcpy (name, typename);
|
||||
strcpy (name, type_name);
|
||||
strcpy (name + len, suffix);
|
||||
|
||||
return ada_find_parallel_type_with_name (type, name);
|
||||
@ -7863,9 +7863,9 @@ variant_field_index (struct type *type)
|
||||
/* A record type with no fields. */
|
||||
|
||||
static struct type *
|
||||
empty_record (struct type *template)
|
||||
empty_record (struct type *templ)
|
||||
{
|
||||
struct type *type = alloc_type_copy (template);
|
||||
struct type *type = alloc_type_copy (templ);
|
||||
|
||||
TYPE_CODE (type) = TYPE_CODE_STRUCT;
|
||||
TYPE_NFIELDS (type) = 0;
|
||||
|
@ -244,7 +244,7 @@ extern struct symbol *ada_lookup_symbol (const char *, const struct block *,
|
||||
domain_enum, int *);
|
||||
|
||||
extern void ada_lookup_encoded_symbol
|
||||
(const char *name, const struct block *block, domain_enum namespace,
|
||||
(const char *name, const struct block *block, domain_enum domain,
|
||||
struct ada_symbol_info *symbol_info);
|
||||
|
||||
extern struct bound_minimal_symbol ada_lookup_simple_minsym (const char *);
|
||||
|
@ -29,14 +29,14 @@
|
||||
implementation. */
|
||||
struct addrmap_funcs
|
||||
{
|
||||
void (*set_empty) (struct addrmap *this,
|
||||
void (*set_empty) (struct addrmap *self,
|
||||
CORE_ADDR start, CORE_ADDR end_inclusive,
|
||||
void *obj);
|
||||
void *(*find) (struct addrmap *this, CORE_ADDR addr);
|
||||
struct addrmap *(*create_fixed) (struct addrmap *this,
|
||||
void *(*find) (struct addrmap *self, CORE_ADDR addr);
|
||||
struct addrmap *(*create_fixed) (struct addrmap *self,
|
||||
struct obstack *obstack);
|
||||
void (*relocate) (struct addrmap *this, CORE_ADDR offset);
|
||||
int (*foreach) (struct addrmap *this, addrmap_foreach_fn fn, void *data);
|
||||
void (*relocate) (struct addrmap *self, CORE_ADDR offset);
|
||||
int (*foreach) (struct addrmap *self, addrmap_foreach_fn fn, void *data);
|
||||
};
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ struct addrmap_fixed
|
||||
|
||||
|
||||
static void
|
||||
addrmap_fixed_set_empty (struct addrmap *this,
|
||||
addrmap_fixed_set_empty (struct addrmap *self,
|
||||
CORE_ADDR start, CORE_ADDR end_inclusive,
|
||||
void *obj)
|
||||
{
|
||||
@ -124,9 +124,9 @@ addrmap_fixed_set_empty (struct addrmap *this,
|
||||
|
||||
|
||||
static void *
|
||||
addrmap_fixed_find (struct addrmap *this, CORE_ADDR addr)
|
||||
addrmap_fixed_find (struct addrmap *self, CORE_ADDR addr)
|
||||
{
|
||||
struct addrmap_fixed *map = (struct addrmap_fixed *) this;
|
||||
struct addrmap_fixed *map = (struct addrmap_fixed *) self;
|
||||
struct addrmap_transition *bottom = &map->transitions[0];
|
||||
struct addrmap_transition *top = &map->transitions[map->num_transitions - 1];
|
||||
|
||||
@ -157,7 +157,7 @@ addrmap_fixed_find (struct addrmap *this, CORE_ADDR addr)
|
||||
|
||||
|
||||
static struct addrmap *
|
||||
addrmap_fixed_create_fixed (struct addrmap *this, struct obstack *obstack)
|
||||
addrmap_fixed_create_fixed (struct addrmap *self, struct obstack *obstack)
|
||||
{
|
||||
internal_error (__FILE__, __LINE__,
|
||||
_("addrmap_create_fixed is not implemented yet "
|
||||
@ -166,9 +166,9 @@ addrmap_fixed_create_fixed (struct addrmap *this, struct obstack *obstack)
|
||||
|
||||
|
||||
static void
|
||||
addrmap_fixed_relocate (struct addrmap *this, CORE_ADDR offset)
|
||||
addrmap_fixed_relocate (struct addrmap *self, CORE_ADDR offset)
|
||||
{
|
||||
struct addrmap_fixed *map = (struct addrmap_fixed *) this;
|
||||
struct addrmap_fixed *map = (struct addrmap_fixed *) self;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < map->num_transitions; i++)
|
||||
@ -177,10 +177,10 @@ addrmap_fixed_relocate (struct addrmap *this, CORE_ADDR offset)
|
||||
|
||||
|
||||
static int
|
||||
addrmap_fixed_foreach (struct addrmap *this, addrmap_foreach_fn fn,
|
||||
addrmap_fixed_foreach (struct addrmap *self, addrmap_foreach_fn fn,
|
||||
void *data)
|
||||
{
|
||||
struct addrmap_fixed *map = (struct addrmap_fixed *) this;
|
||||
struct addrmap_fixed *map = (struct addrmap_fixed *) self;
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < map->num_transitions; i++)
|
||||
@ -315,26 +315,26 @@ addrmap_splay_tree_insert (struct addrmap_mutable *map,
|
||||
tree node at ADDR, even if it would represent a "transition" from
|
||||
one value to the same value. */
|
||||
static void
|
||||
force_transition (struct addrmap_mutable *this, CORE_ADDR addr)
|
||||
force_transition (struct addrmap_mutable *self, CORE_ADDR addr)
|
||||
{
|
||||
splay_tree_node n
|
||||
= addrmap_splay_tree_lookup (this, addr);
|
||||
= addrmap_splay_tree_lookup (self, addr);
|
||||
|
||||
if (! n)
|
||||
{
|
||||
n = addrmap_splay_tree_predecessor (this, addr);
|
||||
addrmap_splay_tree_insert (this, addr,
|
||||
n = addrmap_splay_tree_predecessor (self, addr);
|
||||
addrmap_splay_tree_insert (self, addr,
|
||||
n ? addrmap_node_value (n) : NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
addrmap_mutable_set_empty (struct addrmap *this,
|
||||
addrmap_mutable_set_empty (struct addrmap *self,
|
||||
CORE_ADDR start, CORE_ADDR end_inclusive,
|
||||
void *obj)
|
||||
{
|
||||
struct addrmap_mutable *map = (struct addrmap_mutable *) this;
|
||||
struct addrmap_mutable *map = (struct addrmap_mutable *) self;
|
||||
splay_tree_node n, next;
|
||||
void *prior_value;
|
||||
|
||||
@ -384,7 +384,7 @@ addrmap_mutable_set_empty (struct addrmap *this,
|
||||
|
||||
|
||||
static void *
|
||||
addrmap_mutable_find (struct addrmap *this, CORE_ADDR addr)
|
||||
addrmap_mutable_find (struct addrmap *self, CORE_ADDR addr)
|
||||
{
|
||||
/* Not needed yet. */
|
||||
internal_error (__FILE__, __LINE__,
|
||||
@ -422,15 +422,15 @@ splay_foreach_copy (splay_tree_node n, void *closure)
|
||||
|
||||
|
||||
static struct addrmap *
|
||||
addrmap_mutable_create_fixed (struct addrmap *this, struct obstack *obstack)
|
||||
addrmap_mutable_create_fixed (struct addrmap *self, struct obstack *obstack)
|
||||
{
|
||||
struct addrmap_mutable *mutable = (struct addrmap_mutable *) this;
|
||||
struct addrmap_mutable *mutable_obj = (struct addrmap_mutable *) self;
|
||||
struct addrmap_fixed *fixed;
|
||||
size_t num_transitions;
|
||||
|
||||
/* Count the number of transitions in the tree. */
|
||||
num_transitions = 0;
|
||||
splay_tree_foreach (mutable->tree, splay_foreach_count, &num_transitions);
|
||||
splay_tree_foreach (mutable_obj->tree, splay_foreach_count, &num_transitions);
|
||||
|
||||
/* Include an extra entry for the transition at zero (which fixed
|
||||
maps have, but mutable maps do not.) */
|
||||
@ -447,7 +447,7 @@ addrmap_mutable_create_fixed (struct addrmap *this, struct obstack *obstack)
|
||||
|
||||
/* Copy all entries from the splay tree to the array, in order
|
||||
of increasing address. */
|
||||
splay_tree_foreach (mutable->tree, splay_foreach_copy, fixed);
|
||||
splay_tree_foreach (mutable_obj->tree, splay_foreach_copy, fixed);
|
||||
|
||||
/* We should have filled the array. */
|
||||
gdb_assert (fixed->num_transitions == num_transitions);
|
||||
@ -457,7 +457,7 @@ addrmap_mutable_create_fixed (struct addrmap *this, struct obstack *obstack)
|
||||
|
||||
|
||||
static void
|
||||
addrmap_mutable_relocate (struct addrmap *this, CORE_ADDR offset)
|
||||
addrmap_mutable_relocate (struct addrmap *self, CORE_ADDR offset)
|
||||
{
|
||||
/* Not needed yet. */
|
||||
internal_error (__FILE__, __LINE__,
|
||||
@ -488,15 +488,15 @@ addrmap_mutable_foreach_worker (splay_tree_node node, void *data)
|
||||
|
||||
|
||||
static int
|
||||
addrmap_mutable_foreach (struct addrmap *this, addrmap_foreach_fn fn,
|
||||
addrmap_mutable_foreach (struct addrmap *self, addrmap_foreach_fn fn,
|
||||
void *data)
|
||||
{
|
||||
struct addrmap_mutable *mutable = (struct addrmap_mutable *) this;
|
||||
struct addrmap_mutable *mutable_obj = (struct addrmap_mutable *) self;
|
||||
struct mutable_foreach_data foreach_data;
|
||||
|
||||
foreach_data.fn = fn;
|
||||
foreach_data.data = data;
|
||||
return splay_tree_foreach (mutable->tree, addrmap_mutable_foreach_worker,
|
||||
return splay_tree_foreach (mutable_obj->tree, addrmap_mutable_foreach_worker,
|
||||
&foreach_data);
|
||||
}
|
||||
|
||||
|
@ -757,9 +757,9 @@ sync_threadlists (void)
|
||||
else if (gi == gcount)
|
||||
{
|
||||
thread = add_thread (ptid_build (infpid, 0, pbuf[pi].pthid));
|
||||
thread->private = xmalloc (sizeof (struct private_thread_info));
|
||||
thread->private->pdtid = pbuf[pi].pdtid;
|
||||
thread->private->tid = pbuf[pi].tid;
|
||||
thread->priv = xmalloc (sizeof (struct private_thread_info));
|
||||
thread->priv->pdtid = pbuf[pi].pdtid;
|
||||
thread->priv->tid = pbuf[pi].tid;
|
||||
pi++;
|
||||
}
|
||||
else
|
||||
@ -776,8 +776,8 @@ sync_threadlists (void)
|
||||
|
||||
if (cmp_result == 0)
|
||||
{
|
||||
gbuf[gi]->private->pdtid = pdtid;
|
||||
gbuf[gi]->private->tid = tid;
|
||||
gbuf[gi]->priv->pdtid = pdtid;
|
||||
gbuf[gi]->priv->tid = tid;
|
||||
pi++;
|
||||
gi++;
|
||||
}
|
||||
@ -789,9 +789,9 @@ sync_threadlists (void)
|
||||
else
|
||||
{
|
||||
thread = add_thread (pptid);
|
||||
thread->private = xmalloc (sizeof (struct private_thread_info));
|
||||
thread->private->pdtid = pdtid;
|
||||
thread->private->tid = tid;
|
||||
thread->priv = xmalloc (sizeof (struct private_thread_info));
|
||||
thread->priv->pdtid = pdtid;
|
||||
thread->priv->tid = tid;
|
||||
pi++;
|
||||
}
|
||||
}
|
||||
@ -809,7 +809,7 @@ iter_tid (struct thread_info *thread, void *tidp)
|
||||
{
|
||||
const pthdb_tid_t tid = *(pthdb_tid_t *)tidp;
|
||||
|
||||
return (thread->private->tid == tid);
|
||||
return (thread->priv->tid == tid);
|
||||
}
|
||||
|
||||
/* Synchronize libpthdebug's state with the inferior and with GDB,
|
||||
@ -999,7 +999,7 @@ aix_thread_resume (struct target_ops *ops,
|
||||
error (_("aix-thread resume: unknown pthread %ld"),
|
||||
ptid_get_lwp (ptid));
|
||||
|
||||
tid[0] = thread->private->tid;
|
||||
tid[0] = thread->priv->tid;
|
||||
if (tid[0] == PTHDB_INVALID_TID)
|
||||
error (_("aix-thread resume: no tid for pthread %ld"),
|
||||
ptid_get_lwp (ptid));
|
||||
@ -1313,10 +1313,10 @@ aix_thread_fetch_registers (struct target_ops *ops,
|
||||
else
|
||||
{
|
||||
thread = find_thread_ptid (inferior_ptid);
|
||||
tid = thread->private->tid;
|
||||
tid = thread->priv->tid;
|
||||
|
||||
if (tid == PTHDB_INVALID_TID)
|
||||
fetch_regs_user_thread (regcache, thread->private->pdtid);
|
||||
fetch_regs_user_thread (regcache, thread->priv->pdtid);
|
||||
else
|
||||
fetch_regs_kernel_thread (regcache, regno, tid);
|
||||
}
|
||||
@ -1667,10 +1667,10 @@ aix_thread_store_registers (struct target_ops *ops,
|
||||
else
|
||||
{
|
||||
thread = find_thread_ptid (inferior_ptid);
|
||||
tid = thread->private->tid;
|
||||
tid = thread->priv->tid;
|
||||
|
||||
if (tid == PTHDB_INVALID_TID)
|
||||
store_regs_user_thread (regcache, thread->private->pdtid);
|
||||
store_regs_user_thread (regcache, thread->priv->pdtid);
|
||||
else
|
||||
store_regs_kernel_thread (regcache, regno, tid);
|
||||
}
|
||||
@ -1764,8 +1764,8 @@ aix_thread_extra_thread_info (struct target_ops *self,
|
||||
|
||||
buf = mem_fileopen ();
|
||||
|
||||
pdtid = thread->private->pdtid;
|
||||
tid = thread->private->tid;
|
||||
pdtid = thread->priv->pdtid;
|
||||
tid = thread->priv->tid;
|
||||
|
||||
if (tid != PTHDB_INVALID_TID)
|
||||
/* i18n: Like "thread-identifier %d, [state] running, suspended" */
|
||||
|
@ -508,7 +508,7 @@ amd64_merge_classes (enum amd64_reg_class class1, enum amd64_reg_class class2)
|
||||
return AMD64_SSE;
|
||||
}
|
||||
|
||||
static void amd64_classify (struct type *type, enum amd64_reg_class class[2]);
|
||||
static void amd64_classify (struct type *type, enum amd64_reg_class theclass[2]);
|
||||
|
||||
/* Return non-zero if TYPE is a non-POD structure or union type. */
|
||||
|
||||
@ -527,19 +527,19 @@ amd64_non_pod_p (struct type *type)
|
||||
arrays) and union types, and store the result in CLASS. */
|
||||
|
||||
static void
|
||||
amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
|
||||
amd64_classify_aggregate (struct type *type, enum amd64_reg_class theclass[2])
|
||||
{
|
||||
/* 1. If the size of an object is larger than two eightbytes, or in
|
||||
C++, is a non-POD structure or union type, or contains
|
||||
unaligned fields, it has class memory. */
|
||||
if (TYPE_LENGTH (type) > 16 || amd64_non_pod_p (type))
|
||||
{
|
||||
class[0] = class[1] = AMD64_MEMORY;
|
||||
theclass[0] = theclass[1] = AMD64_MEMORY;
|
||||
return;
|
||||
}
|
||||
|
||||
/* 2. Both eightbytes get initialized to class NO_CLASS. */
|
||||
class[0] = class[1] = AMD64_NO_CLASS;
|
||||
theclass[0] = theclass[1] = AMD64_NO_CLASS;
|
||||
|
||||
/* 3. Each field of an object is classified recursively so that
|
||||
always two fields are considered. The resulting class is
|
||||
@ -551,9 +551,9 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
|
||||
struct type *subtype = check_typedef (TYPE_TARGET_TYPE (type));
|
||||
|
||||
/* All fields in an array have the same type. */
|
||||
amd64_classify (subtype, class);
|
||||
if (TYPE_LENGTH (type) > 8 && class[1] == AMD64_NO_CLASS)
|
||||
class[1] = class[0];
|
||||
amd64_classify (subtype, theclass);
|
||||
if (TYPE_LENGTH (type) > 8 && theclass[1] == AMD64_NO_CLASS)
|
||||
theclass[1] = theclass[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -582,7 +582,7 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
|
||||
gdb_assert (pos == 0 || pos == 1);
|
||||
|
||||
amd64_classify (subtype, subclass);
|
||||
class[pos] = amd64_merge_classes (class[pos], subclass[0]);
|
||||
theclass[pos] = amd64_merge_classes (theclass[pos], subclass[0]);
|
||||
if (bitsize <= 64 && pos == 0 && endpos == 1)
|
||||
/* This is a bit of an odd case: We have a field that would
|
||||
normally fit in one of the two eightbytes, except that
|
||||
@ -606,9 +606,9 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
|
||||
use up all 16 bytes of the aggregate, and are already
|
||||
handled just fine (because each portion sits on its own
|
||||
8-byte). */
|
||||
class[1] = amd64_merge_classes (class[1], subclass[0]);
|
||||
theclass[1] = amd64_merge_classes (theclass[1], subclass[0]);
|
||||
if (pos == 0)
|
||||
class[1] = amd64_merge_classes (class[1], subclass[1]);
|
||||
theclass[1] = amd64_merge_classes (theclass[1], subclass[1]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -616,26 +616,26 @@ amd64_classify_aggregate (struct type *type, enum amd64_reg_class class[2])
|
||||
|
||||
/* Rule (a): If one of the classes is MEMORY, the whole argument is
|
||||
passed in memory. */
|
||||
if (class[0] == AMD64_MEMORY || class[1] == AMD64_MEMORY)
|
||||
class[0] = class[1] = AMD64_MEMORY;
|
||||
if (theclass[0] == AMD64_MEMORY || theclass[1] == AMD64_MEMORY)
|
||||
theclass[0] = theclass[1] = AMD64_MEMORY;
|
||||
|
||||
/* Rule (b): If SSEUP is not preceded by SSE, it is converted to
|
||||
SSE. */
|
||||
if (class[0] == AMD64_SSEUP)
|
||||
class[0] = AMD64_SSE;
|
||||
if (class[1] == AMD64_SSEUP && class[0] != AMD64_SSE)
|
||||
class[1] = AMD64_SSE;
|
||||
if (theclass[0] == AMD64_SSEUP)
|
||||
theclass[0] = AMD64_SSE;
|
||||
if (theclass[1] == AMD64_SSEUP && theclass[0] != AMD64_SSE)
|
||||
theclass[1] = AMD64_SSE;
|
||||
}
|
||||
|
||||
/* Classify TYPE, and store the result in CLASS. */
|
||||
|
||||
static void
|
||||
amd64_classify (struct type *type, enum amd64_reg_class class[2])
|
||||
amd64_classify (struct type *type, enum amd64_reg_class theclass[2])
|
||||
{
|
||||
enum type_code code = TYPE_CODE (type);
|
||||
int len = TYPE_LENGTH (type);
|
||||
|
||||
class[0] = class[1] = AMD64_NO_CLASS;
|
||||
theclass[0] = theclass[1] = AMD64_NO_CLASS;
|
||||
|
||||
/* Arguments of types (signed and unsigned) _Bool, char, short, int,
|
||||
long, long long, and pointers are in the INTEGER class. Similarly,
|
||||
@ -646,28 +646,28 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
|
||||
|| code == TYPE_CODE_CHAR
|
||||
|| code == TYPE_CODE_PTR || code == TYPE_CODE_REF)
|
||||
&& (len == 1 || len == 2 || len == 4 || len == 8))
|
||||
class[0] = AMD64_INTEGER;
|
||||
theclass[0] = AMD64_INTEGER;
|
||||
|
||||
/* Arguments of types float, double, _Decimal32, _Decimal64 and __m64
|
||||
are in class SSE. */
|
||||
else if ((code == TYPE_CODE_FLT || code == TYPE_CODE_DECFLOAT)
|
||||
&& (len == 4 || len == 8))
|
||||
/* FIXME: __m64 . */
|
||||
class[0] = AMD64_SSE;
|
||||
theclass[0] = AMD64_SSE;
|
||||
|
||||
/* Arguments of types __float128, _Decimal128 and __m128 are split into
|
||||
two halves. The least significant ones belong to class SSE, the most
|
||||
significant one to class SSEUP. */
|
||||
else if (code == TYPE_CODE_DECFLOAT && len == 16)
|
||||
/* FIXME: __float128, __m128. */
|
||||
class[0] = AMD64_SSE, class[1] = AMD64_SSEUP;
|
||||
theclass[0] = AMD64_SSE, theclass[1] = AMD64_SSEUP;
|
||||
|
||||
/* The 64-bit mantissa of arguments of type long double belongs to
|
||||
class X87, the 16-bit exponent plus 6 bytes of padding belongs to
|
||||
class X87UP. */
|
||||
else if (code == TYPE_CODE_FLT && len == 16)
|
||||
/* Class X87 and X87UP. */
|
||||
class[0] = AMD64_X87, class[1] = AMD64_X87UP;
|
||||
theclass[0] = AMD64_X87, theclass[1] = AMD64_X87UP;
|
||||
|
||||
/* Arguments of complex T where T is one of the types float or
|
||||
double get treated as if they are implemented as:
|
||||
@ -679,19 +679,19 @@ amd64_classify (struct type *type, enum amd64_reg_class class[2])
|
||||
|
||||
*/
|
||||
else if (code == TYPE_CODE_COMPLEX && len == 8)
|
||||
class[0] = AMD64_SSE;
|
||||
theclass[0] = AMD64_SSE;
|
||||
else if (code == TYPE_CODE_COMPLEX && len == 16)
|
||||
class[0] = class[1] = AMD64_SSE;
|
||||
theclass[0] = theclass[1] = AMD64_SSE;
|
||||
|
||||
/* A variable of type complex long double is classified as type
|
||||
COMPLEX_X87. */
|
||||
else if (code == TYPE_CODE_COMPLEX && len == 32)
|
||||
class[0] = AMD64_COMPLEX_X87;
|
||||
theclass[0] = AMD64_COMPLEX_X87;
|
||||
|
||||
/* Aggregates. */
|
||||
else if (code == TYPE_CODE_ARRAY || code == TYPE_CODE_STRUCT
|
||||
|| code == TYPE_CODE_UNION)
|
||||
amd64_classify_aggregate (type, class);
|
||||
amd64_classify_aggregate (type, theclass);
|
||||
}
|
||||
|
||||
static enum return_value_convention
|
||||
@ -699,7 +699,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
struct type *type, struct regcache *regcache,
|
||||
gdb_byte *readbuf, const gdb_byte *writebuf)
|
||||
{
|
||||
enum amd64_reg_class class[2];
|
||||
enum amd64_reg_class theclass[2];
|
||||
int len = TYPE_LENGTH (type);
|
||||
static int integer_regnum[] = { AMD64_RAX_REGNUM, AMD64_RDX_REGNUM };
|
||||
static int sse_regnum[] = { AMD64_XMM0_REGNUM, AMD64_XMM1_REGNUM };
|
||||
@ -710,7 +710,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
gdb_assert (!(readbuf && writebuf));
|
||||
|
||||
/* 1. Classify the return type with the classification algorithm. */
|
||||
amd64_classify (type, class);
|
||||
amd64_classify (type, theclass);
|
||||
|
||||
/* 2. If the type has class MEMORY, then the caller provides space
|
||||
for the return value and passes the address of this storage in
|
||||
@ -719,7 +719,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
On return %rax will contain the address that has been passed in
|
||||
by the caller in %rdi. */
|
||||
if (class[0] == AMD64_MEMORY)
|
||||
if (theclass[0] == AMD64_MEMORY)
|
||||
{
|
||||
/* As indicated by the comment above, the ABI guarantees that we
|
||||
can always find the return value just after the function has
|
||||
@ -738,7 +738,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
|
||||
/* 8. If the class is COMPLEX_X87, the real part of the value is
|
||||
returned in %st0 and the imaginary part in %st1. */
|
||||
if (class[0] == AMD64_COMPLEX_X87)
|
||||
if (theclass[0] == AMD64_COMPLEX_X87)
|
||||
{
|
||||
if (readbuf)
|
||||
{
|
||||
@ -760,7 +760,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
return RETURN_VALUE_REGISTER_CONVENTION;
|
||||
}
|
||||
|
||||
gdb_assert (class[1] != AMD64_MEMORY);
|
||||
gdb_assert (theclass[1] != AMD64_MEMORY);
|
||||
gdb_assert (len <= 16);
|
||||
|
||||
for (i = 0; len > 0; i++, len -= 8)
|
||||
@ -768,7 +768,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
int regnum = -1;
|
||||
int offset = 0;
|
||||
|
||||
switch (class[i])
|
||||
switch (theclass[i])
|
||||
{
|
||||
case AMD64_INTEGER:
|
||||
/* 3. If the class is INTEGER, the next available register
|
||||
@ -801,7 +801,7 @@ amd64_return_value (struct gdbarch *gdbarch, struct value *function,
|
||||
case AMD64_X87UP:
|
||||
/* 7. If the class is X87UP, the value is returned together
|
||||
with the previous X87 value in %st0. */
|
||||
gdb_assert (i > 0 && class[0] == AMD64_X87);
|
||||
gdb_assert (i > 0 && theclass[0] == AMD64_X87);
|
||||
regnum = AMD64_ST0_REGNUM;
|
||||
offset = 8;
|
||||
len = 2;
|
||||
@ -865,21 +865,21 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
|
||||
{
|
||||
struct type *type = value_type (args[i]);
|
||||
int len = TYPE_LENGTH (type);
|
||||
enum amd64_reg_class class[2];
|
||||
enum amd64_reg_class theclass[2];
|
||||
int needed_integer_regs = 0;
|
||||
int needed_sse_regs = 0;
|
||||
int j;
|
||||
|
||||
/* Classify argument. */
|
||||
amd64_classify (type, class);
|
||||
amd64_classify (type, theclass);
|
||||
|
||||
/* Calculate the number of integer and SSE registers needed for
|
||||
this argument. */
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
if (class[j] == AMD64_INTEGER)
|
||||
if (theclass[j] == AMD64_INTEGER)
|
||||
needed_integer_regs++;
|
||||
else if (class[j] == AMD64_SSE)
|
||||
else if (theclass[j] == AMD64_SSE)
|
||||
needed_sse_regs++;
|
||||
}
|
||||
|
||||
@ -906,7 +906,7 @@ amd64_push_arguments (struct regcache *regcache, int nargs,
|
||||
int regnum = -1;
|
||||
int offset = 0;
|
||||
|
||||
switch (class[j])
|
||||
switch (theclass[j])
|
||||
{
|
||||
case AMD64_INTEGER:
|
||||
regnum = integer_regnum[integer_reg++];
|
||||
|
14
gdb/bcache.c
14
gdb/bcache.c
@ -264,14 +264,14 @@ bcache_full (const void *addr, int length, struct bcache *bcache, int *added)
|
||||
|
||||
/* The user's string isn't in the list. Insert it after *ps. */
|
||||
{
|
||||
struct bstring *new
|
||||
struct bstring *newobj
|
||||
= obstack_alloc (&bcache->cache, BSTRING_SIZE (length));
|
||||
|
||||
memcpy (&new->d.data, addr, length);
|
||||
new->length = length;
|
||||
new->next = bcache->bucket[hash_index];
|
||||
new->half_hash = half_hash;
|
||||
bcache->bucket[hash_index] = new;
|
||||
memcpy (&newobj->d.data, addr, length);
|
||||
newobj->length = length;
|
||||
newobj->next = bcache->bucket[hash_index];
|
||||
newobj->half_hash = half_hash;
|
||||
bcache->bucket[hash_index] = newobj;
|
||||
|
||||
bcache->unique_count++;
|
||||
bcache->unique_size += length;
|
||||
@ -280,7 +280,7 @@ bcache_full (const void *addr, int length, struct bcache *bcache, int *added)
|
||||
if (added)
|
||||
*added = 1;
|
||||
|
||||
return &new->d.data;
|
||||
return &newobj->d.data;
|
||||
}
|
||||
}
|
||||
|
||||
|
10
gdb/block.c
10
gdb/block.c
@ -34,7 +34,7 @@
|
||||
struct block_namespace_info
|
||||
{
|
||||
const char *scope;
|
||||
struct using_direct *using;
|
||||
struct using_direct *using_decl;
|
||||
};
|
||||
|
||||
static void block_initialize_namespace (struct block *block,
|
||||
@ -326,7 +326,7 @@ block_using (const struct block *block)
|
||||
if (block == NULL || BLOCK_NAMESPACE (block) == NULL)
|
||||
return NULL;
|
||||
else
|
||||
return BLOCK_NAMESPACE (block)->using;
|
||||
return BLOCK_NAMESPACE (block)->using_decl;
|
||||
}
|
||||
|
||||
/* Set BLOCK's using member to USING; if needed, allocate memory via
|
||||
@ -335,12 +335,12 @@ block_using (const struct block *block)
|
||||
|
||||
void
|
||||
block_set_using (struct block *block,
|
||||
struct using_direct *using,
|
||||
struct using_direct *using_decl,
|
||||
struct obstack *obstack)
|
||||
{
|
||||
block_initialize_namespace (block, obstack);
|
||||
|
||||
BLOCK_NAMESPACE (block)->using = using;
|
||||
BLOCK_NAMESPACE (block)->using_decl = using_decl;
|
||||
}
|
||||
|
||||
/* If BLOCK_NAMESPACE (block) is NULL, allocate it via OBSTACK and
|
||||
@ -354,7 +354,7 @@ block_initialize_namespace (struct block *block, struct obstack *obstack)
|
||||
BLOCK_NAMESPACE (block)
|
||||
= obstack_alloc (obstack, sizeof (struct block_namespace_info));
|
||||
BLOCK_NAMESPACE (block)->scope = NULL;
|
||||
BLOCK_NAMESPACE (block)->using = NULL;
|
||||
BLOCK_NAMESPACE (block)->using_decl = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ struct block
|
||||
this block: using directives and the current namespace
|
||||
scope. */
|
||||
|
||||
struct block_namespace_info *namespace;
|
||||
struct block_namespace_info *the_namespace;
|
||||
}
|
||||
cplus_specific;
|
||||
}
|
||||
@ -118,7 +118,7 @@ struct global_block
|
||||
#define BLOCK_FUNCTION(bl) (bl)->function
|
||||
#define BLOCK_SUPERBLOCK(bl) (bl)->superblock
|
||||
#define BLOCK_DICT(bl) (bl)->dict
|
||||
#define BLOCK_NAMESPACE(bl) (bl)->language_specific.cplus_specific.namespace
|
||||
#define BLOCK_NAMESPACE(bl) (bl)->language_specific.cplus_specific.the_namespace
|
||||
|
||||
struct blockvector
|
||||
{
|
||||
@ -176,7 +176,7 @@ extern void block_set_scope (struct block *block, const char *scope,
|
||||
extern struct using_direct *block_using (const struct block *block);
|
||||
|
||||
extern void block_set_using (struct block *block,
|
||||
struct using_direct *using,
|
||||
struct using_direct *using_decl,
|
||||
struct obstack *obstack);
|
||||
|
||||
extern const struct block *block_static_block (const struct block *block);
|
||||
|
@ -162,7 +162,7 @@ check_status_exception_catchpoint (struct bpstats *bs)
|
||||
{
|
||||
struct exception_catchpoint *self
|
||||
= (struct exception_catchpoint *) bs->breakpoint_at;
|
||||
char *typename = NULL;
|
||||
char *type_name = NULL;
|
||||
volatile struct gdb_exception e;
|
||||
|
||||
bkpt_breakpoint_ops.check_status (bs);
|
||||
@ -178,22 +178,22 @@ check_status_exception_catchpoint (struct bpstats *bs)
|
||||
char *canon;
|
||||
|
||||
fetch_probe_arguments (NULL, &typeinfo_arg);
|
||||
typename = cplus_typename_from_type_info (typeinfo_arg);
|
||||
type_name = cplus_typename_from_type_info (typeinfo_arg);
|
||||
|
||||
canon = cp_canonicalize_string (typename);
|
||||
canon = cp_canonicalize_string (type_name);
|
||||
if (canon != NULL)
|
||||
{
|
||||
xfree (typename);
|
||||
typename = canon;
|
||||
xfree (type_name);
|
||||
type_name = canon;
|
||||
}
|
||||
}
|
||||
|
||||
if (e.reason < 0)
|
||||
exception_print (gdb_stderr, e);
|
||||
else if (regexec (self->pattern, typename, 0, NULL, 0) != 0)
|
||||
else if (regexec (self->pattern, type_name, 0, NULL, 0) != 0)
|
||||
bs->stop = 0;
|
||||
|
||||
xfree (typename);
|
||||
xfree (type_name);
|
||||
}
|
||||
|
||||
/* Implement the 're_set' method. */
|
||||
|
@ -1622,7 +1622,7 @@ augment_type_symtab (void)
|
||||
struct context_stack *
|
||||
push_context (int desc, CORE_ADDR valu)
|
||||
{
|
||||
struct context_stack *new;
|
||||
struct context_stack *newobj;
|
||||
|
||||
if (context_stack_depth == context_stack_size)
|
||||
{
|
||||
@ -1632,18 +1632,18 @@ push_context (int desc, CORE_ADDR valu)
|
||||
(context_stack_size * sizeof (struct context_stack)));
|
||||
}
|
||||
|
||||
new = &context_stack[context_stack_depth++];
|
||||
new->depth = desc;
|
||||
new->locals = local_symbols;
|
||||
new->old_blocks = pending_blocks;
|
||||
new->start_addr = valu;
|
||||
new->using_directives = using_directives;
|
||||
new->name = NULL;
|
||||
newobj = &context_stack[context_stack_depth++];
|
||||
newobj->depth = desc;
|
||||
newobj->locals = local_symbols;
|
||||
newobj->old_blocks = pending_blocks;
|
||||
newobj->start_addr = valu;
|
||||
newobj->using_directives = using_directives;
|
||||
newobj->name = NULL;
|
||||
|
||||
local_symbols = NULL;
|
||||
using_directives = NULL;
|
||||
|
||||
return new;
|
||||
return newobj;
|
||||
}
|
||||
|
||||
/* Pop a context block. Returns the address of the context block just
|
||||
|
42
gdb/c-exp.y
42
gdb/c-exp.y
@ -164,7 +164,7 @@ static int type_aggregate_p (struct type *);
|
||||
|
||||
struct type_stack *type_stack;
|
||||
|
||||
struct objc_class_str class;
|
||||
struct objc_class_str theclass;
|
||||
}
|
||||
|
||||
%{
|
||||
@ -215,11 +215,11 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
|
||||
%token <ssym> UNKNOWN_CPP_NAME
|
||||
%token <voidval> COMPLETE
|
||||
%token <tsym> TYPENAME
|
||||
%token <class> CLASSNAME /* ObjC Class name */
|
||||
%token <theclass> CLASSNAME /* ObjC Class name */
|
||||
%type <sval> name
|
||||
%type <svec> string_exp
|
||||
%type <ssym> name_not_typename
|
||||
%type <tsym> typename
|
||||
%type <tsym> type_name
|
||||
|
||||
/* This is like a '[' token, but is only generated when parsing
|
||||
Objective C. This lets us reuse the same parser without
|
||||
@ -238,7 +238,7 @@ static void c_print_token (FILE *file, int type, YYSTYPE value);
|
||||
%token TEMPLATE
|
||||
%token ERROR
|
||||
%token NEW DELETE
|
||||
%type <sval> operator
|
||||
%type <sval> oper
|
||||
%token REINTERPRET_CAST DYNAMIC_CAST STATIC_CAST CONST_CAST
|
||||
%token ENTRY
|
||||
%token TYPEOF
|
||||
@ -479,17 +479,17 @@ exp : exp OBJC_LBRAC exp1 ']'
|
||||
|
||||
exp : OBJC_LBRAC TYPENAME
|
||||
{
|
||||
CORE_ADDR class;
|
||||
CORE_ADDR theclass;
|
||||
|
||||
class = lookup_objc_class (parse_gdbarch (pstate),
|
||||
theclass = lookup_objc_class (parse_gdbarch (pstate),
|
||||
copy_name ($2.stoken));
|
||||
if (class == 0)
|
||||
if (theclass == 0)
|
||||
error (_("%s is not an ObjC Class"),
|
||||
copy_name ($2.stoken));
|
||||
write_exp_elt_opcode (pstate, OP_LONG);
|
||||
write_exp_elt_type (pstate,
|
||||
parse_type (pstate)->builtin_int);
|
||||
write_exp_elt_longcst (pstate, (LONGEST) class);
|
||||
write_exp_elt_longcst (pstate, (LONGEST) theclass);
|
||||
write_exp_elt_opcode (pstate, OP_LONG);
|
||||
start_msglist();
|
||||
}
|
||||
@ -505,7 +505,7 @@ exp : OBJC_LBRAC CLASSNAME
|
||||
write_exp_elt_opcode (pstate, OP_LONG);
|
||||
write_exp_elt_type (pstate,
|
||||
parse_type (pstate)->builtin_int);
|
||||
write_exp_elt_longcst (pstate, (LONGEST) $2.class);
|
||||
write_exp_elt_longcst (pstate, (LONGEST) $2.theclass);
|
||||
write_exp_elt_opcode (pstate, OP_LONG);
|
||||
start_msglist();
|
||||
}
|
||||
@ -1390,7 +1390,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
|
||||
$2.length);
|
||||
$$ = NULL;
|
||||
}
|
||||
| UNSIGNED typename
|
||||
| UNSIGNED type_name
|
||||
{ $$ = lookup_unsigned_typename (parse_language (pstate),
|
||||
parse_gdbarch (pstate),
|
||||
TYPE_NAME($2.type)); }
|
||||
@ -1398,7 +1398,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
|
||||
{ $$ = lookup_unsigned_typename (parse_language (pstate),
|
||||
parse_gdbarch (pstate),
|
||||
"int"); }
|
||||
| SIGNED_KEYWORD typename
|
||||
| SIGNED_KEYWORD type_name
|
||||
{ $$ = lookup_signed_typename (parse_language (pstate),
|
||||
parse_gdbarch (pstate),
|
||||
TYPE_NAME($2.type)); }
|
||||
@ -1419,7 +1419,7 @@ typebase /* Implements (approximately): (type-qualifier)* type-specifier */
|
||||
{ $$ = follow_types ($1); }
|
||||
;
|
||||
|
||||
typename: TYPENAME
|
||||
type_name: TYPENAME
|
||||
| INT_KEYWORD
|
||||
{
|
||||
$$.stoken.ptr = "int";
|
||||
@ -1501,7 +1501,7 @@ const_or_volatile_noopt: const_and_volatile
|
||||
{ insert_type (tp_volatile); }
|
||||
;
|
||||
|
||||
operator: OPERATOR NEW
|
||||
oper: OPERATOR NEW
|
||||
{ $$ = operator_stoken (" new"); }
|
||||
| OPERATOR DELETE
|
||||
{ $$ = operator_stoken (" delete"); }
|
||||
@ -1632,7 +1632,7 @@ name : NAME { $$ = $1.stoken; }
|
||||
| TYPENAME { $$ = $1.stoken; }
|
||||
| NAME_OR_INT { $$ = $1.stoken; }
|
||||
| UNKNOWN_CPP_NAME { $$ = $1.stoken; }
|
||||
| operator { $$ = $1; }
|
||||
| oper { $$ = $1; }
|
||||
;
|
||||
|
||||
name_not_typename : NAME
|
||||
@ -1644,7 +1644,7 @@ name_not_typename : NAME
|
||||
context where only a name could occur, this might be useful.
|
||||
| NAME_OR_INT
|
||||
*/
|
||||
| operator
|
||||
| oper
|
||||
{
|
||||
struct field_of_this_result is_a_field_of_this;
|
||||
|
||||
@ -2274,7 +2274,7 @@ enum token_flags
|
||||
|
||||
struct token
|
||||
{
|
||||
char *operator;
|
||||
char *oper;
|
||||
int token;
|
||||
enum exp_opcode opcode;
|
||||
enum token_flags flags;
|
||||
@ -2493,7 +2493,7 @@ lex_one_token (struct parser_state *par_state, int *is_quoted_name)
|
||||
tokstart = lexptr;
|
||||
/* See if it is a special token of length 3. */
|
||||
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
|
||||
if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
|
||||
if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
|
||||
{
|
||||
if ((tokentab3[i].flags & FLAG_CXX) != 0
|
||||
&& parse_language (par_state)->la_language != language_cplus)
|
||||
@ -2506,7 +2506,7 @@ lex_one_token (struct parser_state *par_state, int *is_quoted_name)
|
||||
|
||||
/* See if it is a special token of length 2. */
|
||||
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
|
||||
if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
|
||||
if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
|
||||
{
|
||||
if ((tokentab2[i].flags & FLAG_CXX) != 0
|
||||
&& parse_language (par_state)->la_language != language_cplus)
|
||||
@ -2803,7 +2803,7 @@ lex_one_token (struct parser_state *par_state, int *is_quoted_name)
|
||||
/* Catch specific keywords. */
|
||||
copy = copy_name (yylval.sval);
|
||||
for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
|
||||
if (strcmp (copy, ident_tokens[i].operator) == 0)
|
||||
if (strcmp (copy, ident_tokens[i].oper) == 0)
|
||||
{
|
||||
if ((ident_tokens[i].flags & FLAG_CXX) != 0
|
||||
&& parse_language (par_state)->la_language != language_cplus)
|
||||
@ -2946,10 +2946,10 @@ classify_name (struct parser_state *par_state, const struct block *block,
|
||||
CORE_ADDR Class = lookup_objc_class (parse_gdbarch (par_state), copy);
|
||||
if (Class)
|
||||
{
|
||||
yylval.class.class = Class;
|
||||
yylval.theclass.theclass = Class;
|
||||
sym = lookup_struct_typedef (copy, expression_context_block, 1);
|
||||
if (sym)
|
||||
yylval.class.type = SYMBOL_TYPE (sym);
|
||||
yylval.theclass.type = SYMBOL_TYPE (sym);
|
||||
return CLASSNAME;
|
||||
}
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ set_cmd_completer_handle_brkchars (struct cmd_list_element *cmd,
|
||||
of *LIST). */
|
||||
|
||||
struct cmd_list_element *
|
||||
add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
|
||||
add_cmd (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
|
||||
const char *doc, struct cmd_list_element **list)
|
||||
{
|
||||
struct cmd_list_element *c
|
||||
@ -228,7 +228,7 @@ add_cmd (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
|
||||
}
|
||||
|
||||
c->name = name;
|
||||
c->class = class;
|
||||
c->theclass = theclass;
|
||||
set_cmd_cfunc (c, fun);
|
||||
set_cmd_context (c, NULL);
|
||||
c->doc = doc;
|
||||
@ -283,7 +283,7 @@ deprecate_cmd (struct cmd_list_element *cmd, const char *replacement)
|
||||
}
|
||||
|
||||
struct cmd_list_element *
|
||||
add_alias_cmd (const char *name, const char *oldname, enum command_class class,
|
||||
add_alias_cmd (const char *name, const char *oldname, enum command_class theclass,
|
||||
int abbrev_flag, struct cmd_list_element **list)
|
||||
{
|
||||
const char *tmp;
|
||||
@ -306,7 +306,7 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
|
||||
return 0;
|
||||
}
|
||||
|
||||
c = add_cmd (name, class, NULL, old->doc, list);
|
||||
c = add_cmd (name, theclass, NULL, old->doc, list);
|
||||
|
||||
/* If OLD->DOC can be freed, we should make another copy. */
|
||||
if (old->doc_allocated)
|
||||
@ -335,13 +335,13 @@ add_alias_cmd (const char *name, const char *oldname, enum command_class class,
|
||||
containing that list. */
|
||||
|
||||
struct cmd_list_element *
|
||||
add_prefix_cmd (const char *name, enum command_class class,
|
||||
add_prefix_cmd (const char *name, enum command_class theclass,
|
||||
cmd_cfunc_ftype *fun,
|
||||
const char *doc, struct cmd_list_element **prefixlist,
|
||||
const char *prefixname, int allow_unknown,
|
||||
struct cmd_list_element **list)
|
||||
{
|
||||
struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
|
||||
struct cmd_list_element *c = add_cmd (name, theclass, fun, doc, list);
|
||||
struct cmd_list_element *p;
|
||||
|
||||
c->prefixlist = prefixlist;
|
||||
@ -363,13 +363,13 @@ add_prefix_cmd (const char *name, enum command_class class,
|
||||
/* Like add_prefix_cmd but sets the abbrev_flag on the new command. */
|
||||
|
||||
struct cmd_list_element *
|
||||
add_abbrev_prefix_cmd (const char *name, enum command_class class,
|
||||
add_abbrev_prefix_cmd (const char *name, enum command_class theclass,
|
||||
cmd_cfunc_ftype *fun, const char *doc,
|
||||
struct cmd_list_element **prefixlist,
|
||||
const char *prefixname,
|
||||
int allow_unknown, struct cmd_list_element **list)
|
||||
{
|
||||
struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
|
||||
struct cmd_list_element *c = add_cmd (name, theclass, fun, doc, list);
|
||||
|
||||
c->prefixlist = prefixlist;
|
||||
c->prefixname = prefixname;
|
||||
@ -403,13 +403,13 @@ empty_sfunc (char *args, int from_tty, struct cmd_list_element *c)
|
||||
static struct cmd_list_element *
|
||||
add_set_or_show_cmd (const char *name,
|
||||
enum cmd_types type,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
var_types var_type,
|
||||
void *var,
|
||||
const char *doc,
|
||||
struct cmd_list_element **list)
|
||||
{
|
||||
struct cmd_list_element *c = add_cmd (name, class, NULL, doc, list);
|
||||
struct cmd_list_element *c = add_cmd (name, theclass, NULL, doc, list);
|
||||
|
||||
gdb_assert (type == set_cmd || type == show_cmd);
|
||||
c->type = type;
|
||||
@ -432,7 +432,7 @@ add_set_or_show_cmd (const char *name,
|
||||
|
||||
static void
|
||||
add_setshow_cmd_full (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
var_types var_type, void *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -458,7 +458,7 @@ add_setshow_cmd_full (const char *name,
|
||||
full_set_doc = xstrdup (set_doc);
|
||||
full_show_doc = xstrdup (show_doc);
|
||||
}
|
||||
set = add_set_or_show_cmd (name, set_cmd, class, var_type, var,
|
||||
set = add_set_or_show_cmd (name, set_cmd, theclass, var_type, var,
|
||||
full_set_doc, set_list);
|
||||
set->doc_allocated = 1;
|
||||
|
||||
@ -467,7 +467,7 @@ add_setshow_cmd_full (const char *name,
|
||||
|
||||
set_cmd_prefix (set, set_list);
|
||||
|
||||
show = add_set_or_show_cmd (name, show_cmd, class, var_type, var,
|
||||
show = add_set_or_show_cmd (name, show_cmd, theclass, var_type, var,
|
||||
full_show_doc, show_list);
|
||||
show->doc_allocated = 1;
|
||||
show->show_value_func = show_func;
|
||||
@ -485,7 +485,7 @@ add_setshow_cmd_full (const char *name,
|
||||
|
||||
void
|
||||
add_setshow_enum_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
const char *const *enumlist,
|
||||
const char **var,
|
||||
const char *set_doc,
|
||||
@ -498,7 +498,7 @@ add_setshow_enum_cmd (const char *name,
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_enum, var,
|
||||
add_setshow_cmd_full (name, theclass, var_enum, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -514,7 +514,7 @@ const char * const auto_boolean_enums[] = { "on", "off", "auto", NULL };
|
||||
string. FUNC is the corresponding callback. */
|
||||
void
|
||||
add_setshow_auto_boolean_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
enum auto_boolean *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -525,7 +525,7 @@ add_setshow_auto_boolean_cmd (const char *name,
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_auto_boolean, var,
|
||||
add_setshow_cmd_full (name, theclass, var_auto_boolean, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -538,7 +538,7 @@ add_setshow_auto_boolean_cmd (const char *name,
|
||||
add_cmd. VAR is address of the variable which will contain the
|
||||
value. SET_DOC and SHOW_DOC are the documentation strings. */
|
||||
void
|
||||
add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
|
||||
add_setshow_boolean_cmd (const char *name, enum command_class theclass, int *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
cmd_sfunc_ftype *set_func,
|
||||
@ -549,7 +549,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
|
||||
static const char *boolean_enums[] = { "on", "off", NULL };
|
||||
struct cmd_list_element *c;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_boolean, var,
|
||||
add_setshow_cmd_full (name, theclass, var_boolean, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -560,7 +560,7 @@ add_setshow_boolean_cmd (const char *name, enum command_class class, int *var,
|
||||
/* Add element named NAME to both the set and show command LISTs (the
|
||||
list for set/show or some sublist thereof). */
|
||||
void
|
||||
add_setshow_filename_cmd (const char *name, enum command_class class,
|
||||
add_setshow_filename_cmd (const char *name, enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -571,7 +571,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
|
||||
{
|
||||
struct cmd_list_element *set_result;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_filename, var,
|
||||
add_setshow_cmd_full (name, theclass, var_filename, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -582,7 +582,7 @@ add_setshow_filename_cmd (const char *name, enum command_class class,
|
||||
/* Add element named NAME to both the set and show command LISTs (the
|
||||
list for set/show or some sublist thereof). */
|
||||
void
|
||||
add_setshow_string_cmd (const char *name, enum command_class class,
|
||||
add_setshow_string_cmd (const char *name, enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -591,7 +591,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
|
||||
struct cmd_list_element **set_list,
|
||||
struct cmd_list_element **show_list)
|
||||
{
|
||||
add_setshow_cmd_full (name, class, var_string, var,
|
||||
add_setshow_cmd_full (name, theclass, var_string, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -601,7 +601,7 @@ add_setshow_string_cmd (const char *name, enum command_class class,
|
||||
/* Add element named NAME to both the set and show command LISTs (the
|
||||
list for set/show or some sublist thereof). */
|
||||
struct cmd_list_element *
|
||||
add_setshow_string_noescape_cmd (const char *name, enum command_class class,
|
||||
add_setshow_string_noescape_cmd (const char *name, enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -612,7 +612,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
|
||||
{
|
||||
struct cmd_list_element *set_cmd;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_string_noescape, var,
|
||||
add_setshow_cmd_full (name, theclass, var_string_noescape, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -623,7 +623,7 @@ add_setshow_string_noescape_cmd (const char *name, enum command_class class,
|
||||
/* Add element named NAME to both the set and show command LISTs (the
|
||||
list for set/show or some sublist thereof). */
|
||||
void
|
||||
add_setshow_optional_filename_cmd (const char *name, enum command_class class,
|
||||
add_setshow_optional_filename_cmd (const char *name, enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -634,7 +634,7 @@ add_setshow_optional_filename_cmd (const char *name, enum command_class class,
|
||||
{
|
||||
struct cmd_list_element *set_result;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_optional_filename, var,
|
||||
add_setshow_cmd_full (name, theclass, var_optional_filename, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -666,7 +666,7 @@ integer_unlimited_completer (struct cmd_list_element *ignore,
|
||||
value. SET_DOC and SHOW_DOC are the documentation strings. This
|
||||
function is only used in Python API. Please don't use it elsewhere. */
|
||||
void
|
||||
add_setshow_integer_cmd (const char *name, enum command_class class,
|
||||
add_setshow_integer_cmd (const char *name, enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -677,7 +677,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
|
||||
{
|
||||
struct cmd_list_element *set;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_integer, var,
|
||||
add_setshow_cmd_full (name, theclass, var_integer, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -691,7 +691,7 @@ add_setshow_integer_cmd (const char *name, enum command_class class,
|
||||
add_cmd. VAR is address of the variable which will contain the
|
||||
value. SET_DOC and SHOW_DOC are the documentation strings. */
|
||||
void
|
||||
add_setshow_uinteger_cmd (const char *name, enum command_class class,
|
||||
add_setshow_uinteger_cmd (const char *name, enum command_class theclass,
|
||||
unsigned int *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -702,7 +702,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
|
||||
{
|
||||
struct cmd_list_element *set;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_uinteger, var,
|
||||
add_setshow_cmd_full (name, theclass, var_uinteger, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -716,7 +716,7 @@ add_setshow_uinteger_cmd (const char *name, enum command_class class,
|
||||
add_cmd. VAR is address of the variable which will contain the
|
||||
value. SET_DOC and SHOW_DOC are the documentation strings. */
|
||||
void
|
||||
add_setshow_zinteger_cmd (const char *name, enum command_class class,
|
||||
add_setshow_zinteger_cmd (const char *name, enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -725,7 +725,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
|
||||
struct cmd_list_element **set_list,
|
||||
struct cmd_list_element **show_list)
|
||||
{
|
||||
add_setshow_cmd_full (name, class, var_zinteger, var,
|
||||
add_setshow_cmd_full (name, theclass, var_zinteger, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -734,7 +734,7 @@ add_setshow_zinteger_cmd (const char *name, enum command_class class,
|
||||
|
||||
void
|
||||
add_setshow_zuinteger_unlimited_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -746,7 +746,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
|
||||
{
|
||||
struct cmd_list_element *set;
|
||||
|
||||
add_setshow_cmd_full (name, class, var_zuinteger_unlimited, var,
|
||||
add_setshow_cmd_full (name, theclass, var_zuinteger_unlimited, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -760,7 +760,7 @@ add_setshow_zuinteger_unlimited_cmd (const char *name,
|
||||
add_cmd. VAR is address of the variable which will contain the
|
||||
value. SET_DOC and SHOW_DOC are the documentation strings. */
|
||||
void
|
||||
add_setshow_zuinteger_cmd (const char *name, enum command_class class,
|
||||
add_setshow_zuinteger_cmd (const char *name, enum command_class theclass,
|
||||
unsigned int *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -769,7 +769,7 @@ add_setshow_zuinteger_cmd (const char *name, enum command_class class,
|
||||
struct cmd_list_element **set_list,
|
||||
struct cmd_list_element **show_list)
|
||||
{
|
||||
add_setshow_cmd_full (name, class, var_zuinteger, var,
|
||||
add_setshow_cmd_full (name, theclass, var_zuinteger, var,
|
||||
set_doc, show_doc, help_doc,
|
||||
set_func, show_func,
|
||||
set_list, show_list,
|
||||
@ -870,19 +870,19 @@ add_info_alias (const char *name, const char *oldname, int abbrev_flag)
|
||||
/* Add an element to the list of commands. */
|
||||
|
||||
struct cmd_list_element *
|
||||
add_com (const char *name, enum command_class class, cmd_cfunc_ftype *fun,
|
||||
add_com (const char *name, enum command_class theclass, cmd_cfunc_ftype *fun,
|
||||
const char *doc)
|
||||
{
|
||||
return add_cmd (name, class, fun, doc, &cmdlist);
|
||||
return add_cmd (name, theclass, fun, doc, &cmdlist);
|
||||
}
|
||||
|
||||
/* Add an alias or abbreviation command to the list of commands. */
|
||||
|
||||
struct cmd_list_element *
|
||||
add_com_alias (const char *name, const char *oldname, enum command_class class,
|
||||
add_com_alias (const char *name, const char *oldname, enum command_class theclass,
|
||||
int abbrev_flag)
|
||||
{
|
||||
return add_alias_cmd (name, oldname, class, abbrev_flag, &cmdlist);
|
||||
return add_alias_cmd (name, oldname, theclass, abbrev_flag, &cmdlist);
|
||||
}
|
||||
|
||||
/* Recursively walk the commandlist structures, and print out the
|
||||
@ -991,7 +991,7 @@ help_cmd (const char *command, struct ui_file *stream)
|
||||
|
||||
/* If this is a class name, print all of the commands in the class. */
|
||||
if (c->func == NULL)
|
||||
help_list (cmdlist, "", c->class, stream);
|
||||
help_list (cmdlist, "", c->theclass, stream);
|
||||
|
||||
if (c->hook_pre || c->hook_post)
|
||||
fprintf_filtered (stream,
|
||||
@ -1021,7 +1021,7 @@ help_cmd (const char *command, struct ui_file *stream)
|
||||
*/
|
||||
void
|
||||
help_list (struct cmd_list_element *list, const char *cmdtype,
|
||||
enum command_class class, struct ui_file *stream)
|
||||
enum command_class theclass, struct ui_file *stream)
|
||||
{
|
||||
int len;
|
||||
char *cmdtype1, *cmdtype2;
|
||||
@ -1042,14 +1042,14 @@ help_list (struct cmd_list_element *list, const char *cmdtype,
|
||||
strcpy (cmdtype2 + len - 1, " sub");
|
||||
}
|
||||
|
||||
if (class == all_classes)
|
||||
if (theclass == all_classes)
|
||||
fprintf_filtered (stream, "List of classes of %scommands:\n\n", cmdtype2);
|
||||
else
|
||||
fprintf_filtered (stream, "List of %scommands:\n\n", cmdtype2);
|
||||
|
||||
help_cmd_list (list, class, cmdtype, (int) class >= 0, stream);
|
||||
help_cmd_list (list, theclass, cmdtype, (int) theclass >= 0, stream);
|
||||
|
||||
if (class == all_classes)
|
||||
if (theclass == all_classes)
|
||||
{
|
||||
fprintf_filtered (stream, "\n\
|
||||
Type \"help%s\" followed by a class name for a list of commands in ",
|
||||
@ -1091,7 +1091,7 @@ help_all (struct ui_file *stream)
|
||||
if (c->func == NULL)
|
||||
{
|
||||
fprintf_filtered (stream, "\nCommand class: %s\n\n", c->name);
|
||||
help_cmd_list (cmdlist, c->class, "", 1, stream);
|
||||
help_cmd_list (cmdlist, c->theclass, "", 1, stream);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1104,7 +1104,7 @@ help_all (struct ui_file *stream)
|
||||
if (c->abbrev_flag)
|
||||
continue;
|
||||
|
||||
if (c->class == no_class)
|
||||
if (c->theclass == no_class)
|
||||
{
|
||||
if (!seen_unclassified)
|
||||
{
|
||||
@ -1187,7 +1187,7 @@ print_help_for_command (struct cmd_list_element *c, const char *prefix,
|
||||
* is at the low level, not the high-level).
|
||||
*/
|
||||
void
|
||||
help_cmd_list (struct cmd_list_element *list, enum command_class class,
|
||||
help_cmd_list (struct cmd_list_element *list, enum command_class theclass,
|
||||
const char *prefix, int recurse, struct ui_file *stream)
|
||||
{
|
||||
struct cmd_list_element *c;
|
||||
@ -1195,16 +1195,16 @@ help_cmd_list (struct cmd_list_element *list, enum command_class class,
|
||||
for (c = list; c; c = c->next)
|
||||
{
|
||||
if (c->abbrev_flag == 0
|
||||
&& (class == all_commands
|
||||
|| (class == all_classes && c->func == NULL)
|
||||
|| (class == c->class && c->func != NULL)))
|
||||
&& (theclass == all_commands
|
||||
|| (theclass == all_classes && c->func == NULL)
|
||||
|| (theclass == c->theclass && c->func != NULL)))
|
||||
{
|
||||
print_help_for_command (c, prefix, recurse, stream);
|
||||
}
|
||||
else if (c->abbrev_flag == 0 && recurse
|
||||
&& class == class_user && c->prefixlist != NULL)
|
||||
&& theclass == class_user && c->prefixlist != NULL)
|
||||
/* User-defined commands may be subcommands. */
|
||||
help_cmd_list (*c->prefixlist, class, c->prefixname,
|
||||
help_cmd_list (*c->prefixlist, theclass, c->prefixname,
|
||||
recurse, stream);
|
||||
}
|
||||
}
|
||||
@ -1898,6 +1898,6 @@ cmd_func (struct cmd_list_element *cmd, char *args, int from_tty)
|
||||
int
|
||||
cli_user_command_p (struct cmd_list_element *cmd)
|
||||
{
|
||||
return (cmd->class == class_user
|
||||
return (cmd->theclass == class_user
|
||||
&& (cmd->func == do_cfunc || cmd->func == do_sfunc));
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ struct cmd_list_element
|
||||
const char *name;
|
||||
|
||||
/* Command class; class values are chosen by application program. */
|
||||
enum command_class class;
|
||||
enum command_class theclass;
|
||||
|
||||
/* When 1 indicated that this command is deprecated. It may be
|
||||
removed from gdb's command set in the future. */
|
||||
|
@ -1532,7 +1532,7 @@ define_command (char *comname, int from_tty)
|
||||
{
|
||||
int q;
|
||||
|
||||
if (c->class == class_user || c->class == class_alias)
|
||||
if (c->theclass == class_user || c->theclass == class_alias)
|
||||
q = query (_("Redefine command \"%s\"? "), c->name);
|
||||
else
|
||||
q = query (_("Really redefine built-in command \"%s\"? "), c->name);
|
||||
@ -1584,11 +1584,11 @@ define_command (char *comname, int from_tty)
|
||||
"Type commands for definition of \"%s\".", comfull);
|
||||
cmds = read_command_lines (tmpbuf, from_tty, 1, 0, 0);
|
||||
|
||||
if (c && c->class == class_user)
|
||||
if (c && c->theclass == class_user)
|
||||
free_command_lines (&c->user_commands);
|
||||
|
||||
newc = add_cmd (comname, class_user, user_defined_command,
|
||||
(c && c->class == class_user)
|
||||
(c && c->theclass == class_user)
|
||||
? c->doc : xstrdup ("User-defined."), list);
|
||||
newc->user_commands = cmds;
|
||||
|
||||
@ -1629,7 +1629,7 @@ document_command (char *comname, int from_tty)
|
||||
tem = comname;
|
||||
c = lookup_cmd (&tem, *list, "", 0, 1);
|
||||
|
||||
if (c->class != class_user)
|
||||
if (c->theclass != class_user)
|
||||
error (_("Command \"%s\" is built-in."), comfull);
|
||||
|
||||
xsnprintf (tmpbuf, sizeof (tmpbuf), "Type documentation for \"%s\".",
|
||||
@ -1739,7 +1739,7 @@ show_user_1 (struct cmd_list_element *c, const char *prefix, const char *name,
|
||||
const char *prefixname = c->prefixname;
|
||||
|
||||
for (c = *c->prefixlist; c != NULL; c = c->next)
|
||||
if (c->class == class_user || c->prefixlist != NULL)
|
||||
if (c->theclass == class_user || c->prefixlist != NULL)
|
||||
show_user_1 (c, prefixname, c->name, gdb_stdout);
|
||||
return;
|
||||
}
|
||||
|
@ -37,8 +37,8 @@ notify_command_param_changed_p (int param_changed, struct cmd_list_element *c)
|
||||
if (param_changed == 0)
|
||||
return 0;
|
||||
|
||||
if (c->class == class_maintenance || c->class == class_deprecated
|
||||
|| c->class == class_obscure)
|
||||
if (c->theclass == class_maintenance || c->theclass == class_deprecated
|
||||
|| c->theclass == class_obscure)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
@ -158,16 +158,16 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
|
||||
{
|
||||
case var_string:
|
||||
{
|
||||
char *new;
|
||||
char *newobj;
|
||||
const char *p;
|
||||
char *q;
|
||||
int ch;
|
||||
|
||||
if (arg == NULL)
|
||||
arg = "";
|
||||
new = (char *) xmalloc (strlen (arg) + 2);
|
||||
newobj = (char *) xmalloc (strlen (arg) + 2);
|
||||
p = arg;
|
||||
q = new;
|
||||
q = newobj;
|
||||
while ((ch = *p++) != '\000')
|
||||
{
|
||||
if (ch == '\\')
|
||||
@ -195,18 +195,18 @@ do_set_command (const char *arg, int from_tty, struct cmd_list_element *c)
|
||||
*q++ = ' ';
|
||||
#endif
|
||||
*q++ = '\0';
|
||||
new = (char *) xrealloc (new, q - new);
|
||||
newobj = (char *) xrealloc (newobj, q - newobj);
|
||||
|
||||
if (*(char **) c->var == NULL
|
||||
|| strcmp (*(char **) c->var, new) != 0)
|
||||
|| strcmp (*(char **) c->var, newobj) != 0)
|
||||
{
|
||||
xfree (*(char **) c->var);
|
||||
*(char **) c->var = new;
|
||||
*(char **) c->var = newobj;
|
||||
|
||||
option_changed = 1;
|
||||
}
|
||||
else
|
||||
xfree (new);
|
||||
xfree (newobj);
|
||||
}
|
||||
break;
|
||||
case var_string_noescape:
|
||||
@ -693,7 +693,7 @@ cmd_show_list (struct cmd_list_element *list, int from_tty, const char *prefix)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (list->class != no_set_class)
|
||||
if (list->theclass != no_set_class)
|
||||
{
|
||||
struct cleanup *option_chain
|
||||
= make_cleanup_ui_out_tuple_begin_end (uiout, "option");
|
||||
|
@ -773,7 +773,7 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct context_stack *new;
|
||||
struct context_stack *newobj;
|
||||
struct coff_symbol coff_symbol;
|
||||
struct coff_symbol *cs = &coff_symbol;
|
||||
static struct internal_syment main_sym;
|
||||
@ -1067,9 +1067,9 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
context_stack_depth is zero, and complain if not. */
|
||||
|
||||
depth = 0;
|
||||
new = push_context (depth, fcn_start_addr);
|
||||
newobj = push_context (depth, fcn_start_addr);
|
||||
fcn_cs_saved.c_name = getsymname (&fcn_sym_saved);
|
||||
new->name =
|
||||
newobj->name =
|
||||
process_coff_symbol (&fcn_cs_saved,
|
||||
&fcn_aux_saved, objfile);
|
||||
}
|
||||
@ -1092,9 +1092,9 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
break;
|
||||
}
|
||||
|
||||
new = pop_context ();
|
||||
newobj = pop_context ();
|
||||
/* Stack must be empty now. */
|
||||
if (context_stack_depth > 0 || new == NULL)
|
||||
if (context_stack_depth > 0 || newobj == NULL)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Unmatched .ef symbol(s) ignored "
|
||||
@ -1129,8 +1129,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
enter_linenos (fcn_line_ptr, fcn_first_line,
|
||||
fcn_last_line, objfile);
|
||||
|
||||
finish_block (new->name, &local_symbols,
|
||||
new->old_blocks, new->start_addr,
|
||||
finish_block (newobj->name, &local_symbols,
|
||||
newobj->old_blocks, newobj->start_addr,
|
||||
fcn_cs_saved.c_value
|
||||
+ fcn_aux_saved.x_sym.x_misc.x_fsize
|
||||
+ ANOFFSET (objfile->section_offsets,
|
||||
@ -1158,8 +1158,8 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
break;
|
||||
}
|
||||
|
||||
new = pop_context ();
|
||||
if (depth-- != new->depth)
|
||||
newobj = pop_context ();
|
||||
if (depth-- != newobj->depth)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Mismatched .eb symbol ignored "
|
||||
@ -1173,11 +1173,11 @@ coff_symtab_read (long symtab_offset, unsigned int nsyms,
|
||||
cs->c_value + ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile));
|
||||
/* Make a block for the local symbols within. */
|
||||
finish_block (0, &local_symbols, new->old_blocks,
|
||||
new->start_addr, tmpaddr);
|
||||
finish_block (0, &local_symbols, newobj->old_blocks,
|
||||
newobj->start_addr, tmpaddr);
|
||||
}
|
||||
/* Now pop locals of block just finished. */
|
||||
local_symbols = new->locals;
|
||||
local_symbols = newobj->locals;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -2060,7 +2060,7 @@ coff_read_struct_type (int index, int length, int lastsym,
|
||||
|
||||
struct type *type;
|
||||
struct nextfield *list = 0;
|
||||
struct nextfield *new;
|
||||
struct nextfield *newobj;
|
||||
int nfields = 0;
|
||||
int n;
|
||||
char *name;
|
||||
@ -2087,9 +2087,9 @@ coff_read_struct_type (int index, int length, int lastsym,
|
||||
case C_MOU:
|
||||
|
||||
/* Get space to record the next field's data. */
|
||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||
new->next = list;
|
||||
list = new;
|
||||
newobj = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||
newobj->next = list;
|
||||
list = newobj;
|
||||
|
||||
/* Save the data. */
|
||||
list->field.name = obstack_copy0 (&objfile->objfile_obstack,
|
||||
@ -2104,9 +2104,9 @@ coff_read_struct_type (int index, int length, int lastsym,
|
||||
case C_FIELD:
|
||||
|
||||
/* Get space to record the next field's data. */
|
||||
new = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||
new->next = list;
|
||||
list = new;
|
||||
newobj = (struct nextfield *) alloca (sizeof (struct nextfield));
|
||||
newobj->next = list;
|
||||
list = newobj;
|
||||
|
||||
/* Save the data. */
|
||||
list->field.name = obstack_copy0 (&objfile->objfile_obstack,
|
||||
|
@ -248,7 +248,7 @@ typedef void (show_value_ftype) (struct ui_file *file,
|
||||
extern show_value_ftype deprecated_show_value_hack;
|
||||
|
||||
extern void add_setshow_enum_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
const char *const *enumlist,
|
||||
const char **var,
|
||||
const char *set_doc,
|
||||
@ -260,7 +260,7 @@ extern void add_setshow_enum_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_auto_boolean_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
enum auto_boolean *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -271,7 +271,7 @@ extern void add_setshow_auto_boolean_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_boolean_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc, const char *show_doc,
|
||||
const char *help_doc,
|
||||
@ -281,7 +281,7 @@ extern void add_setshow_boolean_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_filename_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -292,7 +292,7 @@ extern void add_setshow_filename_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_string_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -304,7 +304,7 @@ extern void add_setshow_string_cmd (const char *name,
|
||||
|
||||
extern struct cmd_list_element *add_setshow_string_noescape_cmd
|
||||
(const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -315,7 +315,7 @@ extern struct cmd_list_element *add_setshow_string_noescape_cmd
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_optional_filename_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
char **var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -326,7 +326,7 @@ extern void add_setshow_optional_filename_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_integer_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -337,7 +337,7 @@ extern void add_setshow_integer_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_uinteger_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
unsigned int *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -348,7 +348,7 @@ extern void add_setshow_uinteger_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_zinteger_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -359,7 +359,7 @@ extern void add_setshow_zinteger_cmd (const char *name,
|
||||
struct cmd_list_element **show_list);
|
||||
|
||||
extern void add_setshow_zuinteger_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
unsigned int *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
@ -371,7 +371,7 @@ extern void add_setshow_zuinteger_cmd (const char *name,
|
||||
|
||||
extern void
|
||||
add_setshow_zuinteger_unlimited_cmd (const char *name,
|
||||
enum command_class class,
|
||||
enum command_class theclass,
|
||||
int *var,
|
||||
const char *set_doc,
|
||||
const char *show_doc,
|
||||
|
@ -79,15 +79,15 @@ static struct cleanup *
|
||||
make_my_cleanup2 (struct cleanup **pmy_chain, make_cleanup_ftype *function,
|
||||
void *arg, void (*free_arg) (void *))
|
||||
{
|
||||
struct cleanup *new
|
||||
struct cleanup *newobj
|
||||
= (struct cleanup *) xmalloc (sizeof (struct cleanup));
|
||||
struct cleanup *old_chain = *pmy_chain;
|
||||
|
||||
new->next = *pmy_chain;
|
||||
new->function = function;
|
||||
new->free_arg = free_arg;
|
||||
new->arg = arg;
|
||||
*pmy_chain = new;
|
||||
newobj->next = *pmy_chain;
|
||||
newobj->function = function;
|
||||
newobj->free_arg = free_arg;
|
||||
newobj->arg = arg;
|
||||
*pmy_chain = newobj;
|
||||
|
||||
gdb_assert (old_chain != NULL);
|
||||
return old_chain;
|
||||
|
@ -343,10 +343,11 @@ gdb_fopen_cloexec (const char *filename, const char *opentype)
|
||||
/* See filestuff.h. */
|
||||
|
||||
int
|
||||
gdb_socketpair_cloexec (int namespace, int style, int protocol, int filedes[2])
|
||||
gdb_socketpair_cloexec (int domain, int style, int protocol,
|
||||
int filedes[2])
|
||||
{
|
||||
#ifdef HAVE_SOCKETPAIR
|
||||
int result = socketpair (namespace, style | SOCK_CLOEXEC, protocol, filedes);
|
||||
int result = socketpair (domain, style | SOCK_CLOEXEC, protocol, filedes);
|
||||
|
||||
if (result != -1)
|
||||
{
|
||||
@ -363,9 +364,9 @@ gdb_socketpair_cloexec (int namespace, int style, int protocol, int filedes[2])
|
||||
/* See filestuff.h. */
|
||||
|
||||
int
|
||||
gdb_socket_cloexec (int namespace, int style, int protocol)
|
||||
gdb_socket_cloexec (int domain, int style, int protocol)
|
||||
{
|
||||
int result = socket (namespace, style | SOCK_CLOEXEC, protocol);
|
||||
int result = socket (domain, style | SOCK_CLOEXEC, protocol);
|
||||
|
||||
if (result != -1)
|
||||
socket_mark_cloexec (result);
|
||||
|
@ -54,13 +54,13 @@ extern FILE *gdb_fopen_cloexec (const char *filename, const char *opentype);
|
||||
/* Like 'socketpair', but ensures that the returned file descriptors
|
||||
have the close-on-exec flag set. */
|
||||
|
||||
extern int gdb_socketpair_cloexec (int namespace, int style, int protocol,
|
||||
extern int gdb_socketpair_cloexec (int domain, int style, int protocol,
|
||||
int filedes[2]);
|
||||
|
||||
/* Like 'socket', but ensures that the returned file descriptor has
|
||||
the close-on-exec flag set. */
|
||||
|
||||
extern int gdb_socket_cloexec (int namespace, int style, int protocol);
|
||||
extern int gdb_socket_cloexec (int domain, int style, int protocol);
|
||||
|
||||
/* Like 'pipe', but ensures that the returned file descriptors have
|
||||
the close-on-exec flag set. */
|
||||
|
@ -39,13 +39,13 @@ make_continuation (struct continuation **pmy_chain,
|
||||
continuation_ftype *function,
|
||||
void *arg, void (*free_arg) (void *))
|
||||
{
|
||||
struct continuation *new = XNEW (struct continuation);
|
||||
struct continuation *newobj = XNEW (struct continuation);
|
||||
|
||||
new->next = *pmy_chain;
|
||||
new->function = function;
|
||||
new->free_arg = free_arg;
|
||||
new->arg = arg;
|
||||
*pmy_chain = new;
|
||||
newobj->next = *pmy_chain;
|
||||
newobj->function = function;
|
||||
newobj->free_arg = free_arg;
|
||||
newobj->arg = arg;
|
||||
*pmy_chain = newobj;
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -277,9 +277,9 @@ make_name (const char *name, int len)
|
||||
const char *opname;
|
||||
}
|
||||
|
||||
%type <comp> exp exp1 type start start_opt operator colon_name
|
||||
%type <comp> exp exp1 type start start_opt oper colon_name
|
||||
%type <comp> unqualified_name colon_ext_name
|
||||
%type <comp> template template_arg
|
||||
%type <comp> templ template_arg
|
||||
%type <comp> builtin_type
|
||||
%type <comp> typespec_2 array_indicator
|
||||
%type <comp> colon_ext_only ext_only_name
|
||||
@ -439,7 +439,7 @@ demangler_special
|
||||
{ $$ = fill_comp (DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, $2, $4); }
|
||||
;
|
||||
|
||||
operator : OPERATOR NEW
|
||||
oper : OPERATOR NEW
|
||||
{
|
||||
/* Match the whitespacing of cplus_demangle_operators.
|
||||
It would abort on unrecognized string otherwise. */
|
||||
@ -554,8 +554,8 @@ conversion_op_name
|
||||
|
||||
/* DEMANGLE_COMPONENT_NAME */
|
||||
/* This accepts certain invalid placements of '~'. */
|
||||
unqualified_name: operator
|
||||
| operator '<' template_params '>'
|
||||
unqualified_name: oper
|
||||
| oper '<' template_params '>'
|
||||
{ $$ = fill_comp (DEMANGLE_COMPONENT_TEMPLATE, $1, $3.comp); }
|
||||
| '~' NAME
|
||||
{ $$ = make_dtor (gnu_v3_complete_object_dtor, $2); }
|
||||
@ -579,9 +579,9 @@ colon_name : name
|
||||
name : nested_name NAME %prec NAME
|
||||
{ $$ = $1.comp; d_right ($1.last) = $2; }
|
||||
| NAME %prec NAME
|
||||
| nested_name template %prec NAME
|
||||
| nested_name templ %prec NAME
|
||||
{ $$ = $1.comp; d_right ($1.last) = $2; }
|
||||
| template %prec NAME
|
||||
| templ %prec NAME
|
||||
;
|
||||
|
||||
colon_ext_name : colon_name
|
||||
@ -611,13 +611,13 @@ nested_name : NAME COLONCOLON
|
||||
d_left ($$.last) = $2;
|
||||
d_right ($$.last) = NULL;
|
||||
}
|
||||
| template COLONCOLON
|
||||
| templ COLONCOLON
|
||||
{ $$.comp = make_empty (DEMANGLE_COMPONENT_QUAL_NAME);
|
||||
d_left ($$.comp) = $1;
|
||||
d_right ($$.comp) = NULL;
|
||||
$$.last = $$.comp;
|
||||
}
|
||||
| nested_name template COLONCOLON
|
||||
| nested_name templ COLONCOLON
|
||||
{ $$.comp = $1.comp;
|
||||
d_right ($1.last) = make_empty (DEMANGLE_COMPONENT_QUAL_NAME);
|
||||
$$.last = d_right ($1.last);
|
||||
@ -628,7 +628,7 @@ nested_name : NAME COLONCOLON
|
||||
|
||||
/* DEMANGLE_COMPONENT_TEMPLATE */
|
||||
/* DEMANGLE_COMPONENT_TEMPLATE_ARGLIST */
|
||||
template : NAME '<' template_params '>'
|
||||
templ : NAME '<' template_params '>'
|
||||
{ $$ = fill_comp (DEMANGLE_COMPONENT_TEMPLATE, $1, $3.comp); }
|
||||
;
|
||||
|
||||
|
@ -126,7 +126,7 @@ cp_add_using_directive (const char *dest,
|
||||
struct obstack *obstack)
|
||||
{
|
||||
struct using_direct *current;
|
||||
struct using_direct *new;
|
||||
struct using_direct *newobj;
|
||||
|
||||
/* Has it already been added? */
|
||||
|
||||
@ -163,39 +163,39 @@ cp_add_using_directive (const char *dest,
|
||||
return;
|
||||
}
|
||||
|
||||
new = obstack_alloc (obstack, (sizeof (*new)
|
||||
newobj = obstack_alloc (obstack, (sizeof (*newobj)
|
||||
+ (VEC_length (const_char_ptr, excludes)
|
||||
* sizeof (*new->excludes))));
|
||||
memset (new, 0, sizeof (*new));
|
||||
* sizeof (*newobj->excludes))));
|
||||
memset (newobj, 0, sizeof (*newobj));
|
||||
|
||||
if (copy_names)
|
||||
{
|
||||
new->import_src = obstack_copy0 (obstack, src, strlen (src));
|
||||
new->import_dest = obstack_copy0 (obstack, dest, strlen (dest));
|
||||
newobj->import_src = obstack_copy0 (obstack, src, strlen (src));
|
||||
newobj->import_dest = obstack_copy0 (obstack, dest, strlen (dest));
|
||||
}
|
||||
else
|
||||
{
|
||||
new->import_src = src;
|
||||
new->import_dest = dest;
|
||||
newobj->import_src = src;
|
||||
newobj->import_dest = dest;
|
||||
}
|
||||
|
||||
if (alias != NULL && copy_names)
|
||||
new->alias = obstack_copy0 (obstack, alias, strlen (alias));
|
||||
newobj->alias = obstack_copy0 (obstack, alias, strlen (alias));
|
||||
else
|
||||
new->alias = alias;
|
||||
newobj->alias = alias;
|
||||
|
||||
if (declaration != NULL && copy_names)
|
||||
new->declaration = obstack_copy0 (obstack,
|
||||
newobj->declaration = obstack_copy0 (obstack,
|
||||
declaration, strlen (declaration));
|
||||
else
|
||||
new->declaration = declaration;
|
||||
newobj->declaration = declaration;
|
||||
|
||||
memcpy (new->excludes, VEC_address (const_char_ptr, excludes),
|
||||
VEC_length (const_char_ptr, excludes) * sizeof (*new->excludes));
|
||||
new->excludes[VEC_length (const_char_ptr, excludes)] = NULL;
|
||||
memcpy (newobj->excludes, VEC_address (const_char_ptr, excludes),
|
||||
VEC_length (const_char_ptr, excludes) * sizeof (*newobj->excludes));
|
||||
newobj->excludes[VEC_length (const_char_ptr, excludes)] = NULL;
|
||||
|
||||
new->next = using_directives;
|
||||
using_directives = new;
|
||||
newobj->next = using_directives;
|
||||
using_directives = newobj;
|
||||
}
|
||||
|
||||
/* Test whether or not NAMESPACE looks like it mentions an anonymous
|
||||
@ -293,14 +293,14 @@ cp_lookup_bare_symbol (const struct language_defn *langdef,
|
||||
|
||||
if (search)
|
||||
{
|
||||
struct symbol *this;
|
||||
struct symbol *lang_this;
|
||||
struct type *type;
|
||||
|
||||
this = lookup_language_this (language_def (language_cplus), block);
|
||||
if (this == NULL)
|
||||
lang_this = lookup_language_this (language_def (language_cplus), block);
|
||||
if (lang_this == NULL)
|
||||
return NULL;
|
||||
|
||||
type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (this)));
|
||||
type = check_typedef (TYPE_TARGET_TYPE (SYMBOL_TYPE (lang_this)));
|
||||
/* If TYPE_NAME is NULL, abandon trying to find this symbol.
|
||||
This can happen for lambda functions compiled with clang++,
|
||||
which outputs no name for the container class. */
|
||||
@ -384,7 +384,7 @@ cp_search_static_and_baseclasses (const char *name,
|
||||
"this" if we can compute it. */
|
||||
|
||||
static struct symbol *
|
||||
cp_lookup_symbol_in_namespace (const char *namespace, const char *name,
|
||||
cp_lookup_symbol_in_namespace (const char *the_namespace, const char *name,
|
||||
const struct block *block,
|
||||
const domain_enum domain, int search)
|
||||
{
|
||||
@ -393,11 +393,11 @@ cp_lookup_symbol_in_namespace (const char *namespace, const char *name,
|
||||
unsigned int prefix_len;
|
||||
struct symbol *sym;
|
||||
|
||||
if (namespace[0] != '\0')
|
||||
if (the_namespace[0] != '\0')
|
||||
{
|
||||
concatenated_name = alloca (strlen (namespace) + 2
|
||||
concatenated_name = alloca (strlen (the_namespace) + 2
|
||||
+ strlen (name) + 1);
|
||||
strcpy (concatenated_name, namespace);
|
||||
strcpy (concatenated_name, the_namespace);
|
||||
strcat (concatenated_name, "::");
|
||||
strcat (concatenated_name, name);
|
||||
name = concatenated_name;
|
||||
@ -412,7 +412,8 @@ cp_lookup_symbol_in_namespace (const char *namespace, const char *name,
|
||||
class/namespace. Since we're only searching static and global blocks
|
||||
there's often no need to first do that lookup. */
|
||||
|
||||
is_in_anonymous = namespace[0] != '\0' && cp_is_in_anonymous (namespace);
|
||||
is_in_anonymous
|
||||
= the_namespace[0] != '\0' && cp_is_in_anonymous (the_namespace);
|
||||
sym = cp_basic_lookup_symbol (name, block, domain, is_in_anonymous);
|
||||
if (sym != NULL)
|
||||
return sym;
|
||||
@ -786,7 +787,7 @@ lookup_namespace_scope (const struct language_defn *langdef,
|
||||
const char *scope,
|
||||
int scope_len)
|
||||
{
|
||||
char *namespace;
|
||||
char *the_namespace;
|
||||
|
||||
if (scope[scope_len] != '\0')
|
||||
{
|
||||
@ -822,10 +823,10 @@ lookup_namespace_scope (const struct language_defn *langdef,
|
||||
if (scope_len == 0 && strchr (name, ':') == NULL)
|
||||
return cp_lookup_bare_symbol (langdef, name, block, domain, 1);
|
||||
|
||||
namespace = alloca (scope_len + 1);
|
||||
strncpy (namespace, scope, scope_len);
|
||||
namespace[scope_len] = '\0';
|
||||
return cp_lookup_symbol_in_namespace (namespace, name,
|
||||
the_namespace = alloca (scope_len + 1);
|
||||
strncpy (the_namespace, scope, scope_len);
|
||||
the_namespace[scope_len] = '\0';
|
||||
return cp_lookup_symbol_in_namespace (the_namespace, name,
|
||||
block, domain, 1);
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ static void overload_list_add_symbol (struct symbol *sym,
|
||||
const char *oload_name);
|
||||
|
||||
static void make_symbol_overload_list_using (const char *func_name,
|
||||
const char *namespace);
|
||||
const char *the_namespace);
|
||||
|
||||
static void make_symbol_overload_list_qualified (const char *func_name);
|
||||
|
||||
@ -326,15 +326,15 @@ replace_typedefs_qualified_name (struct demangle_parse_info *info,
|
||||
{
|
||||
if (d_left (comp)->type == DEMANGLE_COMPONENT_NAME)
|
||||
{
|
||||
struct demangle_component new;
|
||||
struct demangle_component newobj;
|
||||
|
||||
ui_file_write (buf, d_left (comp)->u.s_name.s,
|
||||
d_left (comp)->u.s_name.len);
|
||||
name = ui_file_obsavestring (buf, &info->obstack, &len);
|
||||
new.type = DEMANGLE_COMPONENT_NAME;
|
||||
new.u.s_name.s = name;
|
||||
new.u.s_name.len = len;
|
||||
if (inspect_type (info, &new, finder, data))
|
||||
newobj.type = DEMANGLE_COMPONENT_NAME;
|
||||
newobj.u.s_name.s = name;
|
||||
newobj.u.s_name.len = len;
|
||||
if (inspect_type (info, &newobj, finder, data))
|
||||
{
|
||||
char *n, *s;
|
||||
long slen;
|
||||
@ -344,7 +344,7 @@ replace_typedefs_qualified_name (struct demangle_parse_info *info,
|
||||
node. */
|
||||
|
||||
ui_file_rewind (buf);
|
||||
n = cp_comp_to_string (&new, 100);
|
||||
n = cp_comp_to_string (&newobj, 100);
|
||||
if (n == NULL)
|
||||
{
|
||||
/* If something went astray, abort typedef substitutions. */
|
||||
@ -1174,7 +1174,7 @@ overload_list_add_symbol (struct symbol *sym,
|
||||
|
||||
struct symbol **
|
||||
make_symbol_overload_list (const char *func_name,
|
||||
const char *namespace)
|
||||
const char *the_namespace)
|
||||
{
|
||||
struct cleanup *old_cleanups;
|
||||
const char *name;
|
||||
@ -1187,15 +1187,15 @@ make_symbol_overload_list (const char *func_name,
|
||||
|
||||
old_cleanups = make_cleanup (xfree, sym_return_val);
|
||||
|
||||
make_symbol_overload_list_using (func_name, namespace);
|
||||
make_symbol_overload_list_using (func_name, the_namespace);
|
||||
|
||||
if (namespace[0] == '\0')
|
||||
if (the_namespace[0] == '\0')
|
||||
name = func_name;
|
||||
else
|
||||
{
|
||||
char *concatenated_name
|
||||
= alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
|
||||
strcpy (concatenated_name, namespace);
|
||||
= alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
|
||||
strcpy (concatenated_name, the_namespace);
|
||||
strcat (concatenated_name, "::");
|
||||
strcat (concatenated_name, func_name);
|
||||
name = concatenated_name;
|
||||
@ -1226,19 +1226,19 @@ make_symbol_overload_list_block (const char *name,
|
||||
|
||||
static void
|
||||
make_symbol_overload_list_namespace (const char *func_name,
|
||||
const char *namespace)
|
||||
const char *the_namespace)
|
||||
{
|
||||
const char *name;
|
||||
const struct block *block = NULL;
|
||||
|
||||
if (namespace[0] == '\0')
|
||||
if (the_namespace[0] == '\0')
|
||||
name = func_name;
|
||||
else
|
||||
{
|
||||
char *concatenated_name
|
||||
= alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
|
||||
= alloca (strlen (the_namespace) + 2 + strlen (func_name) + 1);
|
||||
|
||||
strcpy (concatenated_name, namespace);
|
||||
strcpy (concatenated_name, the_namespace);
|
||||
strcat (concatenated_name, "::");
|
||||
strcat (concatenated_name, func_name);
|
||||
name = concatenated_name;
|
||||
@ -1263,7 +1263,7 @@ static void
|
||||
make_symbol_overload_list_adl_namespace (struct type *type,
|
||||
const char *func_name)
|
||||
{
|
||||
char *namespace;
|
||||
char *the_namespace;
|
||||
const char *type_name;
|
||||
int i, prefix_len;
|
||||
|
||||
@ -1287,11 +1287,11 @@ make_symbol_overload_list_adl_namespace (struct type *type,
|
||||
|
||||
if (prefix_len != 0)
|
||||
{
|
||||
namespace = alloca (prefix_len + 1);
|
||||
strncpy (namespace, type_name, prefix_len);
|
||||
namespace[prefix_len] = '\0';
|
||||
the_namespace = alloca (prefix_len + 1);
|
||||
strncpy (the_namespace, type_name, prefix_len);
|
||||
the_namespace[prefix_len] = '\0';
|
||||
|
||||
make_symbol_overload_list_namespace (func_name, namespace);
|
||||
make_symbol_overload_list_namespace (func_name, the_namespace);
|
||||
}
|
||||
|
||||
/* Check public base type */
|
||||
@ -1340,7 +1340,7 @@ reset_directive_searched (void *data)
|
||||
|
||||
static void
|
||||
make_symbol_overload_list_using (const char *func_name,
|
||||
const char *namespace)
|
||||
const char *the_namespace)
|
||||
{
|
||||
struct using_direct *current;
|
||||
const struct block *block;
|
||||
@ -1365,7 +1365,7 @@ make_symbol_overload_list_using (const char *func_name,
|
||||
if (current->alias != NULL || current->declaration != NULL)
|
||||
continue;
|
||||
|
||||
if (strcmp (namespace, current->import_dest) == 0)
|
||||
if (strcmp (the_namespace, current->import_dest) == 0)
|
||||
{
|
||||
/* Mark this import as searched so that the recursive call
|
||||
does not search it again. */
|
||||
@ -1383,7 +1383,7 @@ make_symbol_overload_list_using (const char *func_name,
|
||||
}
|
||||
|
||||
/* Now, add names for this namespace. */
|
||||
make_symbol_overload_list_namespace (func_name, namespace);
|
||||
make_symbol_overload_list_namespace (func_name, the_namespace);
|
||||
}
|
||||
|
||||
/* This does the bulk of the work of finding overloaded symbols.
|
||||
|
@ -198,7 +198,7 @@ extern struct symbol *cp_lookup_symbol_nonlocal
|
||||
const struct block *block,
|
||||
const domain_enum domain);
|
||||
|
||||
extern struct symbol *cp_lookup_symbol_namespace (const char *namespace,
|
||||
extern struct symbol *cp_lookup_symbol_namespace (const char *the_namespace,
|
||||
const char *name,
|
||||
const struct block *block,
|
||||
const domain_enum domain);
|
||||
|
@ -96,9 +96,9 @@ const char vtbl_ptr_name[] = "__vtbl_ptr_type";
|
||||
int
|
||||
cp_is_vtbl_ptr_type (struct type *type)
|
||||
{
|
||||
const char *typename = type_name_no_tag (type);
|
||||
const char *type_name = type_name_no_tag (type);
|
||||
|
||||
return (typename != NULL && !strcmp (typename, vtbl_ptr_name));
|
||||
return (type_name != NULL && !strcmp (type_name, vtbl_ptr_name));
|
||||
}
|
||||
|
||||
/* Return truth value for the assertion that TYPE is of the type
|
||||
|
@ -946,7 +946,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
|
||||
|
||||
struct token
|
||||
{
|
||||
char *operator;
|
||||
char *oper;
|
||||
int token;
|
||||
enum exp_opcode opcode;
|
||||
};
|
||||
@ -1330,7 +1330,7 @@ yylex (void)
|
||||
tokstart = lexptr;
|
||||
/* See if it is a special token of length 3. */
|
||||
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
|
||||
if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
|
||||
if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
|
||||
{
|
||||
lexptr += 3;
|
||||
yylval.opcode = tokentab3[i].opcode;
|
||||
@ -1339,7 +1339,7 @@ yylex (void)
|
||||
|
||||
/* See if it is a special token of length 2. */
|
||||
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
|
||||
if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
|
||||
if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
|
||||
{
|
||||
lexptr += 2;
|
||||
yylval.opcode = tokentab2[i].opcode;
|
||||
@ -1565,7 +1565,7 @@ yylex (void)
|
||||
/* Catch specific keywords. */
|
||||
copy = copy_name (yylval.sval);
|
||||
for (i = 0; i < sizeof ident_tokens / sizeof ident_tokens[0]; i++)
|
||||
if (strcmp (copy, ident_tokens[i].operator) == 0)
|
||||
if (strcmp (copy, ident_tokens[i].oper) == 0)
|
||||
{
|
||||
/* It is ok to always set this, even though we don't always
|
||||
strictly need to. */
|
||||
|
@ -118,7 +118,7 @@ get_task_from_args (char *args)
|
||||
{
|
||||
if (ptid_equal (inferior_ptid, null_ptid))
|
||||
printf_unfiltered (_("No inferior running\n"));
|
||||
return current_inferior ()->private->task;
|
||||
return current_inferior ()->priv->task;
|
||||
}
|
||||
if (strcmp (args, "gdb") == 0)
|
||||
return mach_task_self ();
|
||||
@ -258,32 +258,32 @@ info_mach_ports_command (char *args, int from_tty)
|
||||
{
|
||||
struct inferior *inf = current_inferior ();
|
||||
|
||||
if (port == inf->private->task)
|
||||
if (port == inf->priv->task)
|
||||
printf_unfiltered (_(" inferior-task"));
|
||||
else if (port == inf->private->notify_port)
|
||||
else if (port == inf->priv->notify_port)
|
||||
printf_unfiltered (_(" inferior-notify"));
|
||||
else
|
||||
{
|
||||
int k;
|
||||
darwin_thread_t *t;
|
||||
|
||||
for (k = 0; k < inf->private->exception_info.count; k++)
|
||||
if (port == inf->private->exception_info.ports[k])
|
||||
for (k = 0; k < inf->priv->exception_info.count; k++)
|
||||
if (port == inf->priv->exception_info.ports[k])
|
||||
{
|
||||
printf_unfiltered (_(" inferior-excp-port"));
|
||||
break;
|
||||
}
|
||||
|
||||
if (inf->private->threads)
|
||||
if (inf->priv->threads)
|
||||
{
|
||||
for (k = 0;
|
||||
VEC_iterate(darwin_thread_t,
|
||||
inf->private->threads, k, t);
|
||||
inf->priv->threads, k, t);
|
||||
k++)
|
||||
if (port == t->gdb_port)
|
||||
{
|
||||
printf_unfiltered (_(" inferior-thread for 0x%x"),
|
||||
inf->private->task);
|
||||
inf->priv->task);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -742,7 +742,7 @@ info_mach_region_command (char *exp, int from_tty)
|
||||
error (_("Inferior not available"));
|
||||
|
||||
inf = current_inferior ();
|
||||
darwin_debug_region (inf->private->task, address);
|
||||
darwin_debug_region (inf->priv->task, address);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -811,7 +811,7 @@ info_mach_exceptions_command (char *args, int from_tty)
|
||||
{
|
||||
if (ptid_equal (inferior_ptid, null_ptid))
|
||||
printf_unfiltered (_("No inferior running\n"));
|
||||
disp_exception (¤t_inferior ()->private->exception_info);
|
||||
disp_exception (¤t_inferior ()->priv->exception_info);
|
||||
return;
|
||||
}
|
||||
else if (strcmp (args, "host") == 0)
|
||||
@ -835,7 +835,7 @@ info_mach_exceptions_command (char *args, int from_tty)
|
||||
inf = current_inferior ();
|
||||
|
||||
kret = task_get_exception_ports
|
||||
(inf->private->task, EXC_MASK_ALL, info.masks,
|
||||
(inf->priv->task, EXC_MASK_ALL, info.masks,
|
||||
&info.count, info.ports, info.behaviors, info.flavors);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
disp_exception (&info);
|
||||
|
124
gdb/darwin-nat.c
124
gdb/darwin-nat.c
@ -277,7 +277,7 @@ darwin_check_new_threads (struct inferior *inf)
|
||||
unsigned int new_nbr;
|
||||
unsigned int old_nbr;
|
||||
unsigned int new_ix, old_ix;
|
||||
darwin_inferior *darwin_inf = inf->private;
|
||||
darwin_inferior *darwin_inf = inf->priv;
|
||||
VEC (darwin_thread_t) *thread_vec;
|
||||
|
||||
/* Get list of threads. */
|
||||
@ -372,7 +372,7 @@ darwin_check_new_threads (struct inferior *inf)
|
||||
{
|
||||
tp = find_thread_ptid (ptid_build (inf->pid, 0, 0));
|
||||
gdb_assert (tp);
|
||||
tp->private = pti;
|
||||
tp->priv = pti;
|
||||
}
|
||||
VEC_safe_push (darwin_thread_t, thread_vec, pti);
|
||||
new_ix++;
|
||||
@ -403,13 +403,13 @@ darwin_check_new_threads (struct inferior *inf)
|
||||
static int
|
||||
find_inferior_task_it (struct inferior *inf, void *port_ptr)
|
||||
{
|
||||
return inf->private->task == *(task_t*)port_ptr;
|
||||
return inf->priv->task == *(task_t*)port_ptr;
|
||||
}
|
||||
|
||||
static int
|
||||
find_inferior_notify_it (struct inferior *inf, void *port_ptr)
|
||||
{
|
||||
return inf->private->notify_port == *(task_t*)port_ptr;
|
||||
return inf->priv->notify_port == *(task_t*)port_ptr;
|
||||
}
|
||||
|
||||
/* Return an inferior by task port. */
|
||||
@ -434,7 +434,7 @@ darwin_find_thread (struct inferior *inf, thread_t thread)
|
||||
int k;
|
||||
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, t);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, t);
|
||||
k++)
|
||||
if (t->gdb_port == thread)
|
||||
return t;
|
||||
@ -446,14 +446,14 @@ darwin_find_thread (struct inferior *inf, thread_t thread)
|
||||
static void
|
||||
darwin_suspend_inferior (struct inferior *inf)
|
||||
{
|
||||
if (!inf->private->suspended)
|
||||
if (!inf->priv->suspended)
|
||||
{
|
||||
kern_return_t kret;
|
||||
|
||||
kret = task_suspend (inf->private->task);
|
||||
kret = task_suspend (inf->priv->task);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
inf->private->suspended = 1;
|
||||
inf->priv->suspended = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -462,14 +462,14 @@ darwin_suspend_inferior (struct inferior *inf)
|
||||
static void
|
||||
darwin_resume_inferior (struct inferior *inf)
|
||||
{
|
||||
if (inf->private->suspended)
|
||||
if (inf->priv->suspended)
|
||||
{
|
||||
kern_return_t kret;
|
||||
|
||||
kret = task_resume (inf->private->task);
|
||||
kret = task_resume (inf->priv->task);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
inf->private->suspended = 0;
|
||||
inf->priv->suspended = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -706,7 +706,7 @@ darwin_send_reply (struct inferior *inf, darwin_thread_t *thread)
|
||||
MACH_PORT_NULL);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
inf->private->pending_messages--;
|
||||
inf->priv->pending_messages--;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -776,7 +776,7 @@ darwin_resume_inferior_threads (struct inferior *inf, int step, int nsignal)
|
||||
int k;
|
||||
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, thread);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, thread);
|
||||
k++)
|
||||
darwin_resume_thread (inf, thread, step, nsignal);
|
||||
}
|
||||
@ -808,7 +808,7 @@ darwin_suspend_inferior_threads (struct inferior *inf)
|
||||
int k;
|
||||
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, thread);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, thread);
|
||||
k++)
|
||||
switch (thread->msg_state)
|
||||
{
|
||||
@ -928,7 +928,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
|
||||
}
|
||||
*pinf = inf;
|
||||
*pthread = thread;
|
||||
inf->private->pending_messages++;
|
||||
inf->priv->pending_messages++;
|
||||
|
||||
status->kind = TARGET_WAITKIND_STOPPED;
|
||||
thread->msg_state = DARWIN_MESSAGE;
|
||||
@ -995,7 +995,7 @@ darwin_decode_message (mach_msg_header_t *hdr,
|
||||
inf = darwin_find_inferior_by_notify (hdr->msgh_local_port);
|
||||
if (inf != NULL)
|
||||
{
|
||||
if (!inf->private->no_ptrace)
|
||||
if (!inf->priv->no_ptrace)
|
||||
{
|
||||
pid_t res;
|
||||
int wstatus;
|
||||
@ -1099,7 +1099,7 @@ darwin_wait (ptid_t ptid, struct target_waitstatus *status)
|
||||
|
||||
status->kind = TARGET_WAITKIND_STOPPED;
|
||||
status->value.sig = GDB_SIGNAL_TRAP;
|
||||
thread = VEC_index (darwin_thread_t, inf->private->threads, 0);
|
||||
thread = VEC_index (darwin_thread_t, inf->priv->threads, 0);
|
||||
thread->msg_state = DARWIN_STOPPED;
|
||||
return ptid_build (inf->pid, 0, thread->gdb_port);
|
||||
}
|
||||
@ -1203,7 +1203,7 @@ darwin_stop (struct target_ops *self, ptid_t t)
|
||||
struct inferior *inf = current_inferior ();
|
||||
|
||||
/* FIXME: handle in no_ptrace mode. */
|
||||
gdb_assert (!inf->private->no_ptrace);
|
||||
gdb_assert (!inf->priv->no_ptrace);
|
||||
kill (inf->pid, SIGINT);
|
||||
}
|
||||
|
||||
@ -1216,33 +1216,33 @@ darwin_mourn_inferior (struct target_ops *ops)
|
||||
int i;
|
||||
|
||||
/* Deallocate threads. */
|
||||
if (inf->private->threads)
|
||||
if (inf->priv->threads)
|
||||
{
|
||||
int k;
|
||||
darwin_thread_t *t;
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, t);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, t);
|
||||
k++)
|
||||
{
|
||||
kret = mach_port_deallocate (gdb_task, t->gdb_port);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
}
|
||||
VEC_free (darwin_thread_t, inf->private->threads);
|
||||
inf->private->threads = NULL;
|
||||
VEC_free (darwin_thread_t, inf->priv->threads);
|
||||
inf->priv->threads = NULL;
|
||||
}
|
||||
|
||||
kret = mach_port_move_member (gdb_task,
|
||||
inf->private->notify_port, MACH_PORT_NULL);
|
||||
inf->priv->notify_port, MACH_PORT_NULL);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
kret = mach_port_request_notification (gdb_task, inf->private->task,
|
||||
kret = mach_port_request_notification (gdb_task, inf->priv->task,
|
||||
MACH_NOTIFY_DEAD_NAME, 0,
|
||||
MACH_PORT_NULL,
|
||||
MACH_MSG_TYPE_MAKE_SEND_ONCE,
|
||||
&prev);
|
||||
/* This can fail if the task is dead. */
|
||||
inferior_debug (4, "task=0x%x, prev=0x%x, notify_port=0x%x\n",
|
||||
inf->private->task, prev, inf->private->notify_port);
|
||||
inf->priv->task, prev, inf->priv->notify_port);
|
||||
|
||||
if (kret == KERN_SUCCESS)
|
||||
{
|
||||
@ -1250,24 +1250,24 @@ darwin_mourn_inferior (struct target_ops *ops)
|
||||
MACH_CHECK_ERROR (kret);
|
||||
}
|
||||
|
||||
kret = mach_port_destroy (gdb_task, inf->private->notify_port);
|
||||
kret = mach_port_destroy (gdb_task, inf->priv->notify_port);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
|
||||
/* Deallocate saved exception ports. */
|
||||
for (i = 0; i < inf->private->exception_info.count; i++)
|
||||
for (i = 0; i < inf->priv->exception_info.count; i++)
|
||||
{
|
||||
kret = mach_port_deallocate
|
||||
(gdb_task, inf->private->exception_info.ports[i]);
|
||||
(gdb_task, inf->priv->exception_info.ports[i]);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
}
|
||||
inf->private->exception_info.count = 0;
|
||||
inf->priv->exception_info.count = 0;
|
||||
|
||||
kret = mach_port_deallocate (gdb_task, inf->private->task);
|
||||
kret = mach_port_deallocate (gdb_task, inf->priv->task);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
xfree (inf->private);
|
||||
inf->private = NULL;
|
||||
xfree (inf->priv);
|
||||
inf->priv = NULL;
|
||||
|
||||
inf_child_mourn_inferior (ops);
|
||||
}
|
||||
@ -1279,7 +1279,7 @@ darwin_reply_to_all_pending_messages (struct inferior *inf)
|
||||
darwin_thread_t *t;
|
||||
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, t);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, t);
|
||||
k++)
|
||||
{
|
||||
if (t->msg_state == DARWIN_MESSAGE)
|
||||
@ -1302,7 +1302,7 @@ darwin_stop_inferior (struct inferior *inf)
|
||||
|
||||
darwin_reply_to_all_pending_messages (inf);
|
||||
|
||||
if (inf->private->no_ptrace)
|
||||
if (inf->priv->no_ptrace)
|
||||
return;
|
||||
|
||||
res = kill (inf->pid, SIGSTOP);
|
||||
@ -1367,7 +1367,7 @@ darwin_kill_inferior (struct target_ops *ops)
|
||||
|
||||
gdb_assert (inf != NULL);
|
||||
|
||||
kret = darwin_restore_exception_ports (inf->private);
|
||||
kret = darwin_restore_exception_ports (inf->priv);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
darwin_reply_to_all_pending_messages (inf);
|
||||
@ -1396,9 +1396,9 @@ darwin_attach_pid (struct inferior *inf)
|
||||
mach_port_t prev_not;
|
||||
exception_mask_t mask;
|
||||
|
||||
inf->private = XCNEW (darwin_inferior);
|
||||
inf->priv = XCNEW (darwin_inferior);
|
||||
|
||||
kret = task_for_pid (gdb_task, inf->pid, &inf->private->task);
|
||||
kret = task_for_pid (gdb_task, inf->pid, &inf->priv->task);
|
||||
if (kret != KERN_SUCCESS)
|
||||
{
|
||||
int status;
|
||||
@ -1415,7 +1415,7 @@ darwin_attach_pid (struct inferior *inf)
|
||||
}
|
||||
|
||||
inferior_debug (2, _("inferior task: 0x%x, pid: %d\n"),
|
||||
inf->private->task, inf->pid);
|
||||
inf->priv->task, inf->pid);
|
||||
|
||||
if (darwin_ex_port == MACH_PORT_NULL)
|
||||
{
|
||||
@ -1452,23 +1452,23 @@ darwin_attach_pid (struct inferior *inf)
|
||||
|
||||
/* Create a port to be notified when the child task terminates. */
|
||||
kret = mach_port_allocate (gdb_task, MACH_PORT_RIGHT_RECEIVE,
|
||||
&inf->private->notify_port);
|
||||
&inf->priv->notify_port);
|
||||
if (kret != KERN_SUCCESS)
|
||||
error (_("Unable to create notification port, mach_port_allocate "
|
||||
"returned: %d"),
|
||||
kret);
|
||||
|
||||
kret = mach_port_move_member (gdb_task,
|
||||
inf->private->notify_port, darwin_port_set);
|
||||
inf->priv->notify_port, darwin_port_set);
|
||||
if (kret != KERN_SUCCESS)
|
||||
error (_("Unable to move notification port into new port set, "
|
||||
"mach_port_move_member\n"
|
||||
"returned: %d"),
|
||||
kret);
|
||||
|
||||
kret = mach_port_request_notification (gdb_task, inf->private->task,
|
||||
kret = mach_port_request_notification (gdb_task, inf->priv->task,
|
||||
MACH_NOTIFY_DEAD_NAME, 0,
|
||||
inf->private->notify_port,
|
||||
inf->priv->notify_port,
|
||||
MACH_MSG_TYPE_MAKE_SEND_ONCE,
|
||||
&prev_not);
|
||||
if (kret != KERN_SUCCESS)
|
||||
@ -1487,7 +1487,7 @@ its own. This is unexpected, but should otherwise not have any actual\n\
|
||||
impact on the debugging session."));
|
||||
}
|
||||
|
||||
kret = darwin_save_exception_ports (inf->private);
|
||||
kret = darwin_save_exception_ports (inf->priv);
|
||||
if (kret != KERN_SUCCESS)
|
||||
error (_("Unable to save exception ports, task_get_exception_ports"
|
||||
"returned: %d"),
|
||||
@ -1498,7 +1498,7 @@ impact on the debugging session."));
|
||||
mask = EXC_MASK_ALL;
|
||||
else
|
||||
mask = EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT;
|
||||
kret = task_set_exception_ports (inf->private->task, mask, darwin_ex_port,
|
||||
kret = task_set_exception_ports (inf->priv->task, mask, darwin_ex_port,
|
||||
EXCEPTION_DEFAULT, THREAD_STATE_NONE);
|
||||
if (kret != KERN_SUCCESS)
|
||||
error (_("Unable to set exception ports, task_set_exception_ports"
|
||||
@ -1517,9 +1517,9 @@ darwin_init_thread_list (struct inferior *inf)
|
||||
|
||||
darwin_check_new_threads (inf);
|
||||
|
||||
gdb_assert (inf->private->threads
|
||||
&& VEC_length (darwin_thread_t, inf->private->threads) > 0);
|
||||
thread = VEC_index (darwin_thread_t, inf->private->threads, 0);
|
||||
gdb_assert (inf->priv->threads
|
||||
&& VEC_length (darwin_thread_t, inf->priv->threads) > 0);
|
||||
thread = VEC_index (darwin_thread_t, inf->priv->threads, 0);
|
||||
|
||||
/* Note: fork_inferior automatically add a thead but it uses a wrong ptid.
|
||||
Fix up. */
|
||||
@ -1665,7 +1665,7 @@ darwin_setup_fake_stop_event (struct inferior *inf)
|
||||
as well. Otherwise, we'll try resuming it when resuming the
|
||||
inferior, and get a warning because the thread's suspend count
|
||||
is already zero, making the resume request useless. */
|
||||
thread = VEC_index (darwin_thread_t, inf->private->threads, 0);
|
||||
thread = VEC_index (darwin_thread_t, inf->priv->threads, 0);
|
||||
kret = thread_suspend (thread->gdb_port);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
}
|
||||
@ -1719,11 +1719,11 @@ darwin_attach (struct target_ops *ops, const char *args, int from_tty)
|
||||
|
||||
darwin_init_thread_list (inf);
|
||||
|
||||
darwin_check_osabi (inf->private, ptid_get_tid (inferior_ptid));
|
||||
darwin_check_osabi (inf->priv, ptid_get_tid (inferior_ptid));
|
||||
|
||||
darwin_setup_fake_stop_event (inf);
|
||||
|
||||
inf->private->no_ptrace = 1;
|
||||
inf->priv->no_ptrace = 1;
|
||||
}
|
||||
|
||||
/* Take a program previously attached to and detaches it.
|
||||
@ -1753,13 +1753,13 @@ darwin_detach (struct target_ops *ops, const char *args, int from_tty)
|
||||
}
|
||||
|
||||
/* If ptrace() is in use, stop the process. */
|
||||
if (!inf->private->no_ptrace)
|
||||
if (!inf->priv->no_ptrace)
|
||||
darwin_stop_inferior (inf);
|
||||
|
||||
kret = darwin_restore_exception_ports (inf->private);
|
||||
kret = darwin_restore_exception_ports (inf->priv);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
|
||||
if (!inf->private->no_ptrace)
|
||||
if (!inf->priv->no_ptrace)
|
||||
{
|
||||
res = PTRACE (PT_DETACH, inf->pid, 0, 0);
|
||||
if (res != 0)
|
||||
@ -1772,7 +1772,7 @@ darwin_detach (struct target_ops *ops, const char *args, int from_tty)
|
||||
/* When using ptrace, we have just performed a PT_DETACH, which
|
||||
resumes the inferior. On the other hand, when we are not using
|
||||
ptrace, we need to resume its execution ourselves. */
|
||||
if (inf->private->no_ptrace)
|
||||
if (inf->priv->no_ptrace)
|
||||
darwin_resume_inferior (inf);
|
||||
|
||||
darwin_mourn_inferior (ops);
|
||||
@ -1990,7 +1990,7 @@ darwin_xfer_partial (struct target_ops *ops,
|
||||
{
|
||||
case TARGET_OBJECT_MEMORY:
|
||||
{
|
||||
int l = darwin_read_write_inferior (inf->private->task, offset,
|
||||
int l = darwin_read_write_inferior (inf->priv->task, offset,
|
||||
readbuf, writebuf, len);
|
||||
|
||||
if (l == 0)
|
||||
@ -2009,7 +2009,7 @@ darwin_xfer_partial (struct target_ops *ops,
|
||||
/* Support only read. */
|
||||
return TARGET_XFER_E_IO;
|
||||
}
|
||||
return darwin_read_dyld_info (inf->private->task, offset, readbuf, len,
|
||||
return darwin_read_dyld_info (inf->priv->task, offset, readbuf, len,
|
||||
xfered_len);
|
||||
#endif
|
||||
default:
|
||||
@ -2032,10 +2032,10 @@ set_enable_mach_exceptions (char *args, int from_tty,
|
||||
mask = EXC_MASK_ALL;
|
||||
else
|
||||
{
|
||||
darwin_restore_exception_ports (inf->private);
|
||||
darwin_restore_exception_ports (inf->priv);
|
||||
mask = EXC_MASK_SOFTWARE | EXC_MASK_BREAKPOINT;
|
||||
}
|
||||
kret = task_set_exception_ports (inf->private->task, mask, darwin_ex_port,
|
||||
kret = task_set_exception_ports (inf->priv->task, mask, darwin_ex_port,
|
||||
EXCEPTION_DEFAULT, THREAD_STATE_NONE);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
}
|
||||
@ -2070,7 +2070,7 @@ darwin_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
|
||||
|
||||
/* First linear search. */
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, t);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, t);
|
||||
k++)
|
||||
if (t->inf_port == lwp)
|
||||
return ptid_build (ptid_get_pid (inferior_ptid), 0, t->gdb_port);
|
||||
@ -2078,7 +2078,7 @@ darwin_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
|
||||
/* Maybe the port was never extract. Do it now. */
|
||||
|
||||
/* First get inferior port names. */
|
||||
kret = mach_port_names (inf->private->task, &names, &names_count, &types,
|
||||
kret = mach_port_names (inf->priv->task, &names, &names_count, &types,
|
||||
&types_count);
|
||||
MACH_CHECK_ERROR (kret);
|
||||
if (kret != KERN_SUCCESS)
|
||||
@ -2094,7 +2094,7 @@ darwin_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
|
||||
|
||||
/* We just need to know the corresponding name in gdb name space.
|
||||
So extract and deallocate the right. */
|
||||
kret = mach_port_extract_right (inf->private->task, names[i],
|
||||
kret = mach_port_extract_right (inf->priv->task, names[i],
|
||||
MACH_MSG_TYPE_COPY_SEND,
|
||||
&local_name, &local_type);
|
||||
if (kret != KERN_SUCCESS)
|
||||
@ -2102,7 +2102,7 @@ darwin_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
|
||||
mach_port_deallocate (gdb_task, local_name);
|
||||
|
||||
for (k = 0;
|
||||
VEC_iterate (darwin_thread_t, inf->private->threads, k, t);
|
||||
VEC_iterate (darwin_thread_t, inf->priv->threads, k, t);
|
||||
k++)
|
||||
if (t->gdb_port == local_name)
|
||||
{
|
||||
|
@ -2702,7 +2702,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct context_stack *new;
|
||||
struct context_stack *newobj;
|
||||
/* This remembers the address of the start of a function. It is
|
||||
used because in Solaris 2, N_LBRAC, N_RBRAC, and N_SLINE entries
|
||||
are relative to the current function's start address. On systems
|
||||
@ -2779,15 +2779,16 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
}
|
||||
|
||||
within_function = 0;
|
||||
new = pop_context ();
|
||||
newobj = pop_context ();
|
||||
|
||||
/* Make a block for the local symbols within. */
|
||||
block = finish_block (new->name, &local_symbols, new->old_blocks,
|
||||
new->start_addr, new->start_addr + valu);
|
||||
block = finish_block (newobj->name, &local_symbols,
|
||||
newobj->old_blocks,
|
||||
newobj->start_addr, newobj->start_addr + valu);
|
||||
|
||||
/* For C++, set the block's scope. */
|
||||
if (SYMBOL_LANGUAGE (new->name) == language_cplus)
|
||||
cp_set_block_scope (new->name, block, &objfile->objfile_obstack);
|
||||
if (SYMBOL_LANGUAGE (newobj->name) == language_cplus)
|
||||
cp_set_block_scope (newobj->name, block, &objfile->objfile_obstack);
|
||||
|
||||
/* May be switching to an assembler file which may not be using
|
||||
block relative stabs, so reset the offset. */
|
||||
@ -2847,8 +2848,8 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
break;
|
||||
}
|
||||
|
||||
new = pop_context ();
|
||||
if (desc != new->depth)
|
||||
newobj = pop_context ();
|
||||
if (desc != newobj->depth)
|
||||
lbrac_mismatch_complaint (symnum);
|
||||
|
||||
if (local_symbols != NULL)
|
||||
@ -2861,7 +2862,7 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
_("misplaced N_LBRAC entry; discarding local "
|
||||
"symbols which have no enclosing block"));
|
||||
}
|
||||
local_symbols = new->locals;
|
||||
local_symbols = newobj->locals;
|
||||
|
||||
if (context_stack_depth > 1)
|
||||
{
|
||||
@ -2876,15 +2877,15 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
/* Muzzle a compiler bug that makes end < start.
|
||||
|
||||
??? Which compilers? Is this ever harmful?. */
|
||||
if (new->start_addr > valu)
|
||||
if (newobj->start_addr > valu)
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("block start larger than block end"));
|
||||
new->start_addr = valu;
|
||||
newobj->start_addr = valu;
|
||||
}
|
||||
/* Make a block for the local symbols within. */
|
||||
finish_block (0, &local_symbols, new->old_blocks,
|
||||
new->start_addr, valu);
|
||||
finish_block (0, &local_symbols, newobj->old_blocks,
|
||||
newobj->start_addr, valu);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -3183,20 +3184,20 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
|
||||
{
|
||||
struct block *block;
|
||||
|
||||
new = pop_context ();
|
||||
newobj = pop_context ();
|
||||
/* Make a block for the local symbols within. */
|
||||
block = finish_block (new->name, &local_symbols,
|
||||
new->old_blocks, new->start_addr,
|
||||
block = finish_block (newobj->name, &local_symbols,
|
||||
newobj->old_blocks, newobj->start_addr,
|
||||
valu);
|
||||
|
||||
/* For C++, set the block's scope. */
|
||||
if (SYMBOL_LANGUAGE (new->name) == language_cplus)
|
||||
cp_set_block_scope (new->name, block,
|
||||
if (SYMBOL_LANGUAGE (newobj->name) == language_cplus)
|
||||
cp_set_block_scope (newobj->name, block,
|
||||
&objfile->objfile_obstack);
|
||||
}
|
||||
|
||||
new = push_context (0, valu);
|
||||
new->name = define_symbol (valu, name, desc, type, objfile);
|
||||
newobj = push_context (0, valu);
|
||||
newobj->name = define_symbol (valu, name, desc, type, objfile);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -3808,7 +3808,7 @@ dw2_expand_symtabs_with_fullname (struct objfile *objfile,
|
||||
|
||||
static void
|
||||
dw2_map_matching_symbols (struct objfile *objfile,
|
||||
const char * name, domain_enum namespace,
|
||||
const char * name, domain_enum domain,
|
||||
int global,
|
||||
int (*callback) (struct block *,
|
||||
struct symbol *, void *),
|
||||
@ -11275,7 +11275,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
struct objfile *objfile = cu->objfile;
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct context_stack *new;
|
||||
struct context_stack *newobj;
|
||||
CORE_ADDR lowpc;
|
||||
CORE_ADDR highpc;
|
||||
struct die_info *child_die;
|
||||
@ -11343,15 +11343,15 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
}
|
||||
}
|
||||
|
||||
new = push_context (0, lowpc);
|
||||
new->name = new_symbol_full (die, read_type_die (die, cu), cu,
|
||||
newobj = push_context (0, lowpc);
|
||||
newobj->name = new_symbol_full (die, read_type_die (die, cu), cu,
|
||||
(struct symbol *) templ_func);
|
||||
|
||||
/* If there is a location expression for DW_AT_frame_base, record
|
||||
it. */
|
||||
attr = dwarf2_attr (die, DW_AT_frame_base, cu);
|
||||
if (attr)
|
||||
dwarf2_symbol_mark_computed (attr, new->name, cu, 1);
|
||||
dwarf2_symbol_mark_computed (attr, newobj->name, cu, 1);
|
||||
|
||||
cu->list_in_scope = &local_symbols;
|
||||
|
||||
@ -11401,9 +11401,9 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
}
|
||||
}
|
||||
|
||||
new = pop_context ();
|
||||
newobj = pop_context ();
|
||||
/* Make a block for the local symbols within. */
|
||||
block = finish_block (new->name, &local_symbols, new->old_blocks,
|
||||
block = finish_block (newobj->name, &local_symbols, newobj->old_blocks,
|
||||
lowpc, highpc);
|
||||
|
||||
/* For C++, set the block's scope. */
|
||||
@ -11415,7 +11415,7 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
/* If we have address ranges, record them. */
|
||||
dwarf2_record_block_ranges (die, block, baseaddr, cu);
|
||||
|
||||
gdbarch_make_symbol_special (gdbarch, new->name, objfile);
|
||||
gdbarch_make_symbol_special (gdbarch, newobj->name, objfile);
|
||||
|
||||
/* Attach template arguments to function. */
|
||||
if (! VEC_empty (symbolp, template_args))
|
||||
@ -11437,8 +11437,8 @@ read_func_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
a function declares a class that has methods). This means that
|
||||
when we finish processing a function scope, we may need to go
|
||||
back to building a containing block's symbol lists. */
|
||||
local_symbols = new->locals;
|
||||
using_directives = new->using_directives;
|
||||
local_symbols = newobj->locals;
|
||||
using_directives = newobj->using_directives;
|
||||
|
||||
/* If we've finished processing a top-level function, subsequent
|
||||
symbols go in the file symbol list. */
|
||||
@ -11454,7 +11454,7 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
struct objfile *objfile = cu->objfile;
|
||||
struct gdbarch *gdbarch = get_objfile_arch (objfile);
|
||||
struct context_stack *new;
|
||||
struct context_stack *newobj;
|
||||
CORE_ADDR lowpc, highpc;
|
||||
struct die_info *child_die;
|
||||
CORE_ADDR baseaddr;
|
||||
@ -11481,13 +11481,13 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
child_die = sibling_die (child_die);
|
||||
}
|
||||
}
|
||||
new = pop_context ();
|
||||
newobj = pop_context ();
|
||||
|
||||
if (local_symbols != NULL || using_directives != NULL)
|
||||
{
|
||||
struct block *block
|
||||
= finish_block (0, &local_symbols, new->old_blocks, new->start_addr,
|
||||
highpc);
|
||||
= finish_block (0, &local_symbols, newobj->old_blocks,
|
||||
newobj->start_addr, highpc);
|
||||
|
||||
/* Note that recording ranges after traversing children, as we
|
||||
do here, means that recording a parent's ranges entails
|
||||
@ -11501,8 +11501,8 @@ read_lexical_block_scope (struct die_info *die, struct dwarf2_cu *cu)
|
||||
to do. */
|
||||
dwarf2_record_block_ranges (die, block, baseaddr, cu);
|
||||
}
|
||||
local_symbols = new->locals;
|
||||
using_directives = new->using_directives;
|
||||
local_symbols = newobj->locals;
|
||||
using_directives = newobj->using_directives;
|
||||
}
|
||||
|
||||
/* Read in DW_TAG_GNU_call_site and insert it to CU->call_site_htab. */
|
||||
@ -12715,7 +12715,7 @@ static int
|
||||
dwarf2_is_constructor (struct die_info *die, struct dwarf2_cu *cu)
|
||||
{
|
||||
const char *fieldname;
|
||||
const char *typename;
|
||||
const char *type_name;
|
||||
int len;
|
||||
|
||||
if (die->parent == NULL)
|
||||
@ -12727,13 +12727,13 @@ dwarf2_is_constructor (struct die_info *die, struct dwarf2_cu *cu)
|
||||
return 0;
|
||||
|
||||
fieldname = dwarf2_name (die, cu);
|
||||
typename = dwarf2_name (die->parent, cu);
|
||||
if (fieldname == NULL || typename == NULL)
|
||||
type_name = dwarf2_name (die->parent, cu);
|
||||
if (fieldname == NULL || type_name == NULL)
|
||||
return 0;
|
||||
|
||||
len = strlen (fieldname);
|
||||
return (strncmp (fieldname, typename, len) == 0
|
||||
&& (typename[len] == '\0' || typename[len] == '<'));
|
||||
return (strncmp (fieldname, type_name, len) == 0
|
||||
&& (type_name[len] == '\0' || type_name[len] == '<'));
|
||||
}
|
||||
|
||||
/* Add a member function to the proper fieldlist. */
|
||||
|
@ -78,10 +78,10 @@ init_environ (struct gdb_environ *e)
|
||||
while (--i >= 0)
|
||||
{
|
||||
int len = strlen (e->vector[i]);
|
||||
char *new = (char *) xmalloc (len + 1);
|
||||
char *newobj = (char *) xmalloc (len + 1);
|
||||
|
||||
memcpy (new, e->vector[i], len + 1);
|
||||
e->vector[i] = new;
|
||||
memcpy (newobj, e->vector[i], len + 1);
|
||||
e->vector[i] = newobj;
|
||||
}
|
||||
}
|
||||
|
||||
|
16
gdb/f-exp.y
16
gdb/f-exp.y
@ -830,7 +830,7 @@ parse_number (struct parser_state *par_state,
|
||||
|
||||
struct token
|
||||
{
|
||||
char *operator;
|
||||
char *oper;
|
||||
int token;
|
||||
enum exp_opcode opcode;
|
||||
};
|
||||
@ -1006,11 +1006,11 @@ yylex (void)
|
||||
|
||||
/* See if it is a special .foo. operator. */
|
||||
|
||||
for (i = 0; dot_ops[i].operator != NULL; i++)
|
||||
if (strncmp (tokstart, dot_ops[i].operator,
|
||||
strlen (dot_ops[i].operator)) == 0)
|
||||
for (i = 0; dot_ops[i].oper != NULL; i++)
|
||||
if (strncmp (tokstart, dot_ops[i].oper,
|
||||
strlen (dot_ops[i].oper)) == 0)
|
||||
{
|
||||
lexptr += strlen (dot_ops[i].operator);
|
||||
lexptr += strlen (dot_ops[i].oper);
|
||||
yylval.opcode = dot_ops[i].opcode;
|
||||
return dot_ops[i].token;
|
||||
}
|
||||
@ -1175,9 +1175,9 @@ yylex (void)
|
||||
|
||||
/* Catch specific keywords. */
|
||||
|
||||
for (i = 0; f77_keywords[i].operator != NULL; i++)
|
||||
if (strlen (f77_keywords[i].operator) == namelen
|
||||
&& strncmp (tokstart, f77_keywords[i].operator, namelen) == 0)
|
||||
for (i = 0; f77_keywords[i].oper != NULL; i++)
|
||||
if (strlen (f77_keywords[i].oper) == namelen
|
||||
&& strncmp (tokstart, f77_keywords[i].oper, namelen) == 0)
|
||||
{
|
||||
/* lexptr += strlen(f77_keywords[i].operator); */
|
||||
yylval.opcode = f77_keywords[i].opcode;
|
||||
|
@ -753,9 +753,9 @@ frame_find_by_id (struct frame_id id)
|
||||
|
||||
for (frame = get_current_frame (); ; frame = prev_frame)
|
||||
{
|
||||
struct frame_id this = get_frame_id (frame);
|
||||
struct frame_id self = get_frame_id (frame);
|
||||
|
||||
if (frame_id_eq (id, this))
|
||||
if (frame_id_eq (id, self))
|
||||
/* An exact match. */
|
||||
return frame;
|
||||
|
||||
@ -769,7 +769,7 @@ frame_find_by_id (struct frame_id id)
|
||||
frame in the current frame chain can have this ID. See the
|
||||
comment at frame_id_inner for details. */
|
||||
if (get_frame_type (frame) == NORMAL_FRAME
|
||||
&& !frame_id_inner (get_frame_arch (frame), id, this)
|
||||
&& !frame_id_inner (get_frame_arch (frame), id, self)
|
||||
&& frame_id_inner (get_frame_arch (prev_frame), id,
|
||||
get_frame_id (prev_frame)))
|
||||
return NULL;
|
||||
|
@ -5029,7 +5029,7 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
||||
if (new_gdbarch->initialized_p)
|
||||
{
|
||||
struct gdbarch_list **list;
|
||||
struct gdbarch_list *this;
|
||||
struct gdbarch_list *self;
|
||||
if (gdbarch_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
|
||||
"Previous architecture %s (%s) selected\n",
|
||||
@ -5041,12 +5041,12 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
||||
list = &(*list)->next);
|
||||
/* It had better be in the list of architectures. */
|
||||
gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
|
||||
/* Unlink THIS. */
|
||||
this = (*list);
|
||||
(*list) = this->next;
|
||||
/* Insert THIS at the front. */
|
||||
this->next = rego->arches;
|
||||
rego->arches = this;
|
||||
/* Unlink SELF. */
|
||||
self = (*list);
|
||||
(*list) = self->next;
|
||||
/* Insert SELF at the front. */
|
||||
self->next = rego->arches;
|
||||
rego->arches = self;
|
||||
/* Return it. */
|
||||
return new_gdbarch;
|
||||
}
|
||||
@ -5061,10 +5061,10 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
||||
/* Insert the new architecture into the front of the architecture
|
||||
list (keep the list sorted Most Recently Used). */
|
||||
{
|
||||
struct gdbarch_list *this = XNEW (struct gdbarch_list);
|
||||
this->next = rego->arches;
|
||||
this->gdbarch = new_gdbarch;
|
||||
rego->arches = this;
|
||||
struct gdbarch_list *self = XNEW (struct gdbarch_list);
|
||||
self->next = rego->arches;
|
||||
self->gdbarch = new_gdbarch;
|
||||
rego->arches = self;
|
||||
}
|
||||
|
||||
/* Check that the newly installed architecture is valid. Plug in
|
||||
|
@ -2366,7 +2366,7 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
||||
if (new_gdbarch->initialized_p)
|
||||
{
|
||||
struct gdbarch_list **list;
|
||||
struct gdbarch_list *this;
|
||||
struct gdbarch_list *self;
|
||||
if (gdbarch_debug)
|
||||
fprintf_unfiltered (gdb_stdlog, "gdbarch_find_by_info: "
|
||||
"Previous architecture %s (%s) selected\n",
|
||||
@ -2378,12 +2378,12 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
||||
list = &(*list)->next);
|
||||
/* It had better be in the list of architectures. */
|
||||
gdb_assert ((*list) != NULL && (*list)->gdbarch == new_gdbarch);
|
||||
/* Unlink THIS. */
|
||||
this = (*list);
|
||||
(*list) = this->next;
|
||||
/* Insert THIS at the front. */
|
||||
this->next = rego->arches;
|
||||
rego->arches = this;
|
||||
/* Unlink SELF. */
|
||||
self = (*list);
|
||||
(*list) = self->next;
|
||||
/* Insert SELF at the front. */
|
||||
self->next = rego->arches;
|
||||
rego->arches = self;
|
||||
/* Return it. */
|
||||
return new_gdbarch;
|
||||
}
|
||||
@ -2398,10 +2398,10 @@ gdbarch_find_by_info (struct gdbarch_info info)
|
||||
/* Insert the new architecture into the front of the architecture
|
||||
list (keep the list sorted Most Recently Used). */
|
||||
{
|
||||
struct gdbarch_list *this = XNEW (struct gdbarch_list);
|
||||
this->next = rego->arches;
|
||||
this->gdbarch = new_gdbarch;
|
||||
rego->arches = this;
|
||||
struct gdbarch_list *self = XNEW (struct gdbarch_list);
|
||||
self->next = rego->arches;
|
||||
self->gdbarch = new_gdbarch;
|
||||
rego->arches = self;
|
||||
}
|
||||
|
||||
/* Check that the newly installed architecture is valid. Plug in
|
||||
|
@ -1,3 +1,8 @@
|
||||
2015-02-27 Tom Tromey <tromey@redhat.com>
|
||||
Pedro Alves <palves@redhat.com>
|
||||
|
||||
Rename symbols whose names are reserved C++ keywords throughout.
|
||||
|
||||
2015-02-27 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* Makefile.in (COMPILER): New, get it from autoconf.
|
||||
|
@ -69,7 +69,7 @@ struct process_info
|
||||
const struct target_desc *tdesc;
|
||||
|
||||
/* Private target data. */
|
||||
struct process_info_private *private;
|
||||
struct process_info_private *priv;
|
||||
};
|
||||
|
||||
#define ptid_of(inf) ((inf)->entry.id)
|
||||
|
@ -721,7 +721,7 @@ aarch64_get_debug_reg_state ()
|
||||
struct process_info *proc;
|
||||
|
||||
proc = current_process ();
|
||||
return &proc->private->arch_private->debug_reg_state;
|
||||
return &proc->priv->arch_private->debug_reg_state;
|
||||
}
|
||||
|
||||
/* Record the insertion of one breakpoint/watchpoint, as represented
|
||||
@ -1151,7 +1151,7 @@ aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|
||||
int tid = ptid_get_lwp (ptid);
|
||||
struct process_info *proc = find_process_pid (ptid_get_pid (ptid));
|
||||
struct aarch64_debug_reg_state *state
|
||||
= &proc->private->arch_private->debug_reg_state;
|
||||
= &proc->priv->arch_private->debug_reg_state;
|
||||
|
||||
if (show_debug_regs)
|
||||
fprintf (stderr, "prepare_to_resume thread %ld\n", lwpid_of (thread));
|
||||
|
@ -590,12 +590,12 @@ arm_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
if (watch)
|
||||
{
|
||||
count = arm_linux_get_hw_watchpoint_count ();
|
||||
pts = proc->private->arch_private->wpts;
|
||||
pts = proc->priv->arch_private->wpts;
|
||||
}
|
||||
else
|
||||
{
|
||||
count = arm_linux_get_hw_breakpoint_count ();
|
||||
pts = proc->private->arch_private->bpts;
|
||||
pts = proc->priv->arch_private->bpts;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
@ -630,12 +630,12 @@ arm_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
if (watch)
|
||||
{
|
||||
count = arm_linux_get_hw_watchpoint_count ();
|
||||
pts = proc->private->arch_private->wpts;
|
||||
pts = proc->priv->arch_private->wpts;
|
||||
}
|
||||
else
|
||||
{
|
||||
count = arm_linux_get_hw_breakpoint_count ();
|
||||
pts = proc->private->arch_private->bpts;
|
||||
pts = proc->priv->arch_private->bpts;
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
@ -725,7 +725,7 @@ arm_prepare_to_resume (struct lwp_info *lwp)
|
||||
struct thread_info *thread = get_lwp_thread (lwp);
|
||||
int pid = lwpid_of (thread);
|
||||
struct process_info *proc = find_process_pid (pid_of (thread));
|
||||
struct arch_process_info *proc_info = proc->private->arch_private;
|
||||
struct arch_process_info *proc_info = proc->priv->arch_private;
|
||||
struct arch_lwp_info *lwp_info = lwp->arch_private;
|
||||
int i;
|
||||
|
||||
|
@ -357,13 +357,13 @@ linux_add_process (int pid, int attached)
|
||||
struct process_info *proc;
|
||||
|
||||
proc = add_process (pid, attached);
|
||||
proc->private = xcalloc (1, sizeof (*proc->private));
|
||||
proc->priv = xcalloc (1, sizeof (*proc->priv));
|
||||
|
||||
/* Set the arch when the first LWP stops. */
|
||||
proc->private->new_inferior = 1;
|
||||
proc->priv->new_inferior = 1;
|
||||
|
||||
if (the_low_target.new_process != NULL)
|
||||
proc->private->arch_private = the_low_target.new_process ();
|
||||
proc->priv->arch_private = the_low_target.new_process ();
|
||||
|
||||
return proc;
|
||||
}
|
||||
@ -1167,10 +1167,10 @@ linux_mourn (struct process_info *process)
|
||||
find_inferior (&all_threads, delete_lwp_callback, process);
|
||||
|
||||
/* Freeing all private data. */
|
||||
priv = process->private;
|
||||
priv = process->priv;
|
||||
free (priv->arch_private);
|
||||
free (priv);
|
||||
process->private = NULL;
|
||||
process->priv = NULL;
|
||||
|
||||
remove_process (process);
|
||||
}
|
||||
@ -1842,7 +1842,7 @@ linux_low_filter_event (int lwpid, int wstat)
|
||||
is stopped for the first time, but before we access any
|
||||
inferior registers. */
|
||||
proc = find_process_pid (pid_of (thread));
|
||||
if (proc->private->new_inferior)
|
||||
if (proc->priv->new_inferior)
|
||||
{
|
||||
struct thread_info *saved_thread;
|
||||
|
||||
@ -1853,7 +1853,7 @@ linux_low_filter_event (int lwpid, int wstat)
|
||||
|
||||
current_thread = saved_thread;
|
||||
|
||||
proc->private->new_inferior = 0;
|
||||
proc->priv->new_inferior = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2757,7 +2757,7 @@ linux_wait_1 (ptid_t ptid,
|
||||
&& current_thread->last_resume_kind != resume_step
|
||||
&& (
|
||||
#if defined (USE_THREAD_DB) && !defined (__ANDROID__)
|
||||
(current_process ()->private->thread_db != NULL
|
||||
(current_process ()->priv->thread_db != NULL
|
||||
&& (WSTOPSIG (w) == __SIGRTMIN
|
||||
|| WSTOPSIG (w) == __SIGRTMIN + 1))
|
||||
||
|
||||
@ -4821,7 +4821,7 @@ linux_look_up_symbols (void)
|
||||
#ifdef USE_THREAD_DB
|
||||
struct process_info *proc = current_process ();
|
||||
|
||||
if (proc->private->thread_db != NULL)
|
||||
if (proc->priv->thread_db != NULL)
|
||||
return;
|
||||
|
||||
/* If the kernel supports tracing clones, then we don't need to
|
||||
@ -5741,7 +5741,7 @@ linux_qxfer_libraries_svr4 (const char *annex, unsigned char *readbuf,
|
||||
{
|
||||
char *document;
|
||||
unsigned document_len;
|
||||
struct process_info_private *const priv = current_process ()->private;
|
||||
struct process_info_private *const priv = current_process ()->priv;
|
||||
char filename[PATH_MAX];
|
||||
int pid, is_elf64;
|
||||
|
||||
|
@ -353,19 +353,19 @@ mips_linux_prepare_to_resume (struct lwp_info *lwp)
|
||||
{
|
||||
ptid_t ptid = ptid_of (get_lwp_thread (lwp));
|
||||
struct process_info *proc = find_process_pid (ptid_get_pid (ptid));
|
||||
struct arch_process_info *private = proc->private->arch_private;
|
||||
struct arch_process_info *priv = proc->priv->arch_private;
|
||||
|
||||
if (lwp->arch_private->watch_registers_changed)
|
||||
{
|
||||
/* Only update the watch registers if we have set or unset a
|
||||
watchpoint already. */
|
||||
if (mips_linux_watch_get_num_valid (&private->watch_mirror) > 0)
|
||||
if (mips_linux_watch_get_num_valid (&priv->watch_mirror) > 0)
|
||||
{
|
||||
/* Write the mirrored watch register values. */
|
||||
int tid = ptid_get_lwp (ptid);
|
||||
|
||||
if (-1 == ptrace (PTRACE_SET_WATCH_REGS, tid,
|
||||
&private->watch_mirror))
|
||||
&priv->watch_mirror))
|
||||
perror_with_name ("Couldn't write watch register");
|
||||
}
|
||||
|
||||
@ -395,7 +395,7 @@ mips_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
int len, struct raw_breakpoint *bp)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
struct arch_process_info *private = proc->private->arch_private;
|
||||
struct arch_process_info *priv = proc->priv->arch_private;
|
||||
struct pt_watch_regs regs;
|
||||
struct mips_watchpoint *new_watch;
|
||||
struct mips_watchpoint **pw;
|
||||
@ -406,17 +406,17 @@ mips_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
|
||||
lwpid = lwpid_of (current_thread);
|
||||
if (!mips_linux_read_watch_registers (lwpid,
|
||||
&private->watch_readback,
|
||||
&private->watch_readback_valid,
|
||||
&priv->watch_readback,
|
||||
&priv->watch_readback_valid,
|
||||
0))
|
||||
return -1;
|
||||
|
||||
if (len <= 0)
|
||||
return -1;
|
||||
|
||||
regs = private->watch_readback;
|
||||
regs = priv->watch_readback;
|
||||
/* Add the current watches. */
|
||||
mips_linux_watch_populate_regs (private->current_watches, ®s);
|
||||
mips_linux_watch_populate_regs (priv->current_watches, ®s);
|
||||
|
||||
/* Now try to add the new watch. */
|
||||
watch_type = raw_bkpt_type_to_target_hw_bp_type (type);
|
||||
@ -431,12 +431,12 @@ mips_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
new_watch->type = watch_type;
|
||||
new_watch->next = NULL;
|
||||
|
||||
pw = &private->current_watches;
|
||||
pw = &priv->current_watches;
|
||||
while (*pw != NULL)
|
||||
pw = &(*pw)->next;
|
||||
*pw = new_watch;
|
||||
|
||||
private->watch_mirror = regs;
|
||||
priv->watch_mirror = regs;
|
||||
|
||||
/* Only update the threads of this process. */
|
||||
pid = pid_of (proc);
|
||||
@ -453,7 +453,7 @@ mips_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
int len, struct raw_breakpoint *bp)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
struct arch_process_info *private = proc->private->arch_private;
|
||||
struct arch_process_info *priv = proc->priv->arch_private;
|
||||
|
||||
int deleted_one;
|
||||
int pid;
|
||||
@ -465,7 +465,7 @@ mips_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
/* Search for a known watch that matches. Then unlink and free it. */
|
||||
watch_type = raw_bkpt_type_to_target_hw_bp_type (type);
|
||||
deleted_one = 0;
|
||||
pw = &private->current_watches;
|
||||
pw = &priv->current_watches;
|
||||
while ((w = *pw))
|
||||
{
|
||||
if (w->addr == addr && w->len == len && w->type == watch_type)
|
||||
@ -483,11 +483,11 @@ mips_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
|
||||
/* At this point watch_readback is known to be valid because we
|
||||
could not have added the watch without reading it. */
|
||||
gdb_assert (private->watch_readback_valid == 1);
|
||||
gdb_assert (priv->watch_readback_valid == 1);
|
||||
|
||||
private->watch_mirror = private->watch_readback;
|
||||
mips_linux_watch_populate_regs (private->current_watches,
|
||||
&private->watch_mirror);
|
||||
priv->watch_mirror = priv->watch_readback;
|
||||
mips_linux_watch_populate_regs (priv->current_watches,
|
||||
&priv->watch_mirror);
|
||||
|
||||
/* Only update the threads of this process. */
|
||||
pid = pid_of (proc);
|
||||
@ -503,21 +503,21 @@ static int
|
||||
mips_stopped_by_watchpoint (void)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
struct arch_process_info *private = proc->private->arch_private;
|
||||
struct arch_process_info *priv = proc->priv->arch_private;
|
||||
int n;
|
||||
int num_valid;
|
||||
long lwpid = lwpid_of (current_thread);
|
||||
|
||||
if (!mips_linux_read_watch_registers (lwpid,
|
||||
&private->watch_readback,
|
||||
&private->watch_readback_valid,
|
||||
&priv->watch_readback,
|
||||
&priv->watch_readback_valid,
|
||||
1))
|
||||
return 0;
|
||||
|
||||
num_valid = mips_linux_watch_get_num_valid (&private->watch_readback);
|
||||
num_valid = mips_linux_watch_get_num_valid (&priv->watch_readback);
|
||||
|
||||
for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++)
|
||||
if (mips_linux_watch_get_watchhi (&private->watch_readback, n)
|
||||
if (mips_linux_watch_get_watchhi (&priv->watch_readback, n)
|
||||
& (R_MASK | W_MASK))
|
||||
return 1;
|
||||
|
||||
@ -531,7 +531,7 @@ static CORE_ADDR
|
||||
mips_stopped_data_address (void)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
struct arch_process_info *private = proc->private->arch_private;
|
||||
struct arch_process_info *priv = proc->priv->arch_private;
|
||||
int n;
|
||||
int num_valid;
|
||||
long lwpid = lwpid_of (current_thread);
|
||||
@ -543,28 +543,28 @@ mips_stopped_data_address (void)
|
||||
triggered. */
|
||||
|
||||
if (!mips_linux_read_watch_registers (lwpid,
|
||||
&private->watch_readback,
|
||||
&private->watch_readback_valid,
|
||||
&priv->watch_readback,
|
||||
&priv->watch_readback_valid,
|
||||
0))
|
||||
return 0;
|
||||
|
||||
num_valid = mips_linux_watch_get_num_valid (&private->watch_readback);
|
||||
num_valid = mips_linux_watch_get_num_valid (&priv->watch_readback);
|
||||
|
||||
for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++)
|
||||
if (mips_linux_watch_get_watchhi (&private->watch_readback, n)
|
||||
if (mips_linux_watch_get_watchhi (&priv->watch_readback, n)
|
||||
& (R_MASK | W_MASK))
|
||||
{
|
||||
CORE_ADDR t_low, t_hi;
|
||||
int t_irw;
|
||||
struct mips_watchpoint *watch;
|
||||
|
||||
t_low = mips_linux_watch_get_watchlo (&private->watch_readback, n);
|
||||
t_low = mips_linux_watch_get_watchlo (&priv->watch_readback, n);
|
||||
t_irw = t_low & IRW_MASK;
|
||||
t_hi = (mips_linux_watch_get_watchhi (&private->watch_readback, n)
|
||||
t_hi = (mips_linux_watch_get_watchhi (&priv->watch_readback, n)
|
||||
| IRW_MASK);
|
||||
t_low &= ~(CORE_ADDR)t_hi;
|
||||
|
||||
for (watch = private->current_watches;
|
||||
for (watch = priv->current_watches;
|
||||
watch != NULL;
|
||||
watch = watch->next)
|
||||
{
|
||||
|
@ -690,7 +690,7 @@ x86_insert_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
enum target_hw_bp_type hw_type
|
||||
= raw_bkpt_type_to_target_hw_bp_type (type);
|
||||
struct x86_debug_reg_state *state
|
||||
= &proc->private->arch_private->debug_reg_state;
|
||||
= &proc->priv->arch_private->debug_reg_state;
|
||||
|
||||
return x86_dr_insert_watchpoint (state, hw_type, addr, size);
|
||||
}
|
||||
@ -719,7 +719,7 @@ x86_remove_point (enum raw_bkpt_type type, CORE_ADDR addr,
|
||||
enum target_hw_bp_type hw_type
|
||||
= raw_bkpt_type_to_target_hw_bp_type (type);
|
||||
struct x86_debug_reg_state *state
|
||||
= &proc->private->arch_private->debug_reg_state;
|
||||
= &proc->priv->arch_private->debug_reg_state;
|
||||
|
||||
return x86_dr_remove_watchpoint (state, hw_type, addr, size);
|
||||
}
|
||||
@ -733,7 +733,7 @@ static int
|
||||
x86_stopped_by_watchpoint (void)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
return x86_dr_stopped_by_watchpoint (&proc->private->arch_private->debug_reg_state);
|
||||
return x86_dr_stopped_by_watchpoint (&proc->priv->arch_private->debug_reg_state);
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
@ -741,7 +741,7 @@ x86_stopped_data_address (void)
|
||||
{
|
||||
struct process_info *proc = current_process ();
|
||||
CORE_ADDR addr;
|
||||
if (x86_dr_stopped_data_address (&proc->private->arch_private->debug_reg_state,
|
||||
if (x86_dr_stopped_data_address (&proc->priv->arch_private->debug_reg_state,
|
||||
&addr))
|
||||
return addr;
|
||||
return 0;
|
||||
@ -786,7 +786,7 @@ x86_linux_prepare_to_resume (struct lwp_info *lwp)
|
||||
int pid = ptid_get_pid (ptid);
|
||||
struct process_info *proc = find_process_pid (pid);
|
||||
struct x86_debug_reg_state *state
|
||||
= &proc->private->arch_private->debug_reg_state;
|
||||
= &proc->priv->arch_private->debug_reg_state;
|
||||
|
||||
x86_linux_dr_set (ptid, DR_CONTROL, 0);
|
||||
|
||||
|
@ -218,8 +218,8 @@ lynx_add_process (int pid, int attached)
|
||||
|
||||
proc = add_process (pid, attached);
|
||||
proc->tdesc = lynx_tdesc;
|
||||
proc->private = xcalloc (1, sizeof (*proc->private));
|
||||
proc->private->last_wait_event_ptid = null_ptid;
|
||||
proc->priv = xcalloc (1, sizeof (*proc->priv));
|
||||
proc->priv->last_wait_event_ptid = null_ptid;
|
||||
|
||||
return proc;
|
||||
}
|
||||
@ -334,7 +334,7 @@ lynx_resume (struct thread_resume *resume_info, size_t n)
|
||||
unexpected signals (Eg SIG61) when we resume the inferior
|
||||
using a different thread. */
|
||||
if (ptid_equal (ptid, minus_one_ptid))
|
||||
ptid = current_process()->private->last_wait_event_ptid;
|
||||
ptid = current_process()->priv->last_wait_event_ptid;
|
||||
|
||||
/* The ptid might still be minus_one_ptid; this can happen between
|
||||
the moment we create the inferior or attach to a process, and
|
||||
@ -422,7 +422,7 @@ retry:
|
||||
|
||||
ret = lynx_waitpid (pid, &wstat);
|
||||
new_ptid = lynx_ptid_build (ret, ((union wait *) &wstat)->w_tid);
|
||||
find_process_pid (ret)->private->last_wait_event_ptid = new_ptid;
|
||||
find_process_pid (ret)->priv->last_wait_event_ptid = new_ptid;
|
||||
|
||||
/* If this is a new thread, then add it now. The reason why we do
|
||||
this here instead of when handling new-thread events is because
|
||||
@ -552,8 +552,8 @@ static void
|
||||
lynx_mourn (struct process_info *proc)
|
||||
{
|
||||
/* Free our private data. */
|
||||
free (proc->private);
|
||||
proc->private = NULL;
|
||||
free (proc->priv);
|
||||
proc->priv = NULL;
|
||||
|
||||
clear_inferiors ();
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ thread_db_create_event (CORE_ADDR where)
|
||||
td_event_msg_t msg;
|
||||
td_err_e err;
|
||||
struct lwp_info *lwp;
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
|
||||
gdb_assert (thread_db->td_ta_event_getmsg_p != NULL);
|
||||
|
||||
@ -228,7 +228,7 @@ thread_db_enable_reporting (void)
|
||||
td_thr_events_t events;
|
||||
td_notify_t notify;
|
||||
td_err_e err;
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
|
||||
if (thread_db->td_ta_set_event_p == NULL
|
||||
|| thread_db->td_ta_event_addr_p == NULL
|
||||
@ -272,7 +272,7 @@ find_one_thread (ptid_t ptid)
|
||||
td_err_e err;
|
||||
struct thread_info *inferior;
|
||||
struct lwp_info *lwp;
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
int lwpid = ptid_get_lwp (ptid);
|
||||
|
||||
inferior = (struct thread_info *) find_inferior_id (&all_threads, ptid);
|
||||
@ -352,7 +352,7 @@ attach_thread (const td_thrhandle_t *th_p, td_thrinfo_t *ti_p)
|
||||
if (thread_db_use_events)
|
||||
{
|
||||
td_err_e err;
|
||||
struct thread_db *thread_db = proc->private->thread_db;
|
||||
struct thread_db *thread_db = proc->priv->thread_db;
|
||||
|
||||
err = thread_db->td_thr_event_enable_p (th_p, 1);
|
||||
if (err != TD_OK)
|
||||
@ -391,7 +391,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
{
|
||||
td_thrinfo_t ti;
|
||||
td_err_e err;
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
|
||||
err = thread_db->td_thr_get_info_p (th_p, &ti);
|
||||
if (err != TD_OK)
|
||||
@ -430,7 +430,7 @@ thread_db_find_new_threads (void)
|
||||
{
|
||||
td_err_e err;
|
||||
ptid_t ptid = current_ptid;
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
int loop, iteration;
|
||||
|
||||
/* This function is only called when we first initialize thread_db.
|
||||
@ -476,7 +476,7 @@ thread_db_find_new_threads (void)
|
||||
static void
|
||||
thread_db_look_up_symbols (void)
|
||||
{
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
const char **sym_list;
|
||||
CORE_ADDR unused;
|
||||
|
||||
@ -491,7 +491,7 @@ thread_db_look_up_symbols (void)
|
||||
int
|
||||
thread_db_look_up_one_symbol (const char *name, CORE_ADDR *addrp)
|
||||
{
|
||||
struct thread_db *thread_db = current_process ()->private->thread_db;
|
||||
struct thread_db *thread_db = current_process ()->priv->thread_db;
|
||||
int may_ask_gdb = !thread_db->all_symbols_looked_up;
|
||||
|
||||
/* If we've passed the call to thread_db_look_up_symbols, then
|
||||
@ -514,7 +514,7 @@ thread_db_get_tls_address (struct thread_info *thread, CORE_ADDR offset,
|
||||
struct thread_db *thread_db;
|
||||
|
||||
proc = get_thread_process (thread);
|
||||
thread_db = proc->private->thread_db;
|
||||
thread_db = proc->priv->thread_db;
|
||||
|
||||
/* If the thread layer is not (yet) initialized, fail. */
|
||||
if (thread_db == NULL || !thread_db->all_symbols_looked_up)
|
||||
@ -575,10 +575,10 @@ thread_db_load_search (void)
|
||||
struct thread_db *tdb;
|
||||
struct process_info *proc = current_process ();
|
||||
|
||||
gdb_assert (proc->private->thread_db == NULL);
|
||||
gdb_assert (proc->priv->thread_db == NULL);
|
||||
|
||||
tdb = xcalloc (1, sizeof (*tdb));
|
||||
proc->private->thread_db = tdb;
|
||||
proc->priv->thread_db = tdb;
|
||||
|
||||
tdb->td_ta_new_p = &td_ta_new;
|
||||
|
||||
@ -589,7 +589,7 @@ thread_db_load_search (void)
|
||||
if (debug_threads)
|
||||
debug_printf ("td_ta_new(): %s\n", thread_db_err_str (err));
|
||||
free (tdb);
|
||||
proc->private->thread_db = NULL;
|
||||
proc->priv->thread_db = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -620,10 +620,10 @@ try_thread_db_load_1 (void *handle)
|
||||
struct thread_db *tdb;
|
||||
struct process_info *proc = current_process ();
|
||||
|
||||
gdb_assert (proc->private->thread_db == NULL);
|
||||
gdb_assert (proc->priv->thread_db == NULL);
|
||||
|
||||
tdb = xcalloc (1, sizeof (*tdb));
|
||||
proc->private->thread_db = tdb;
|
||||
proc->priv->thread_db = tdb;
|
||||
|
||||
tdb->handle = handle;
|
||||
|
||||
@ -640,7 +640,7 @@ try_thread_db_load_1 (void *handle)
|
||||
if (required) \
|
||||
{ \
|
||||
free (tdb); \
|
||||
proc->private->thread_db = NULL; \
|
||||
proc->priv->thread_db = NULL; \
|
||||
return 0; \
|
||||
} \
|
||||
} \
|
||||
@ -656,7 +656,7 @@ try_thread_db_load_1 (void *handle)
|
||||
if (debug_threads)
|
||||
debug_printf ("td_ta_new(): %s\n", thread_db_err_str (err));
|
||||
free (tdb);
|
||||
proc->private->thread_db = NULL;
|
||||
proc->priv->thread_db = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ switch_to_process (struct process_info *proc)
|
||||
static void
|
||||
disable_thread_event_reporting (struct process_info *proc)
|
||||
{
|
||||
struct thread_db *thread_db = proc->private->thread_db;
|
||||
struct thread_db *thread_db = proc->priv->thread_db;
|
||||
if (thread_db)
|
||||
{
|
||||
td_err_e (*td_ta_clear_event_p) (const td_thragent_t *ta,
|
||||
@ -941,7 +941,7 @@ disable_thread_event_reporting (struct process_info *proc)
|
||||
static void
|
||||
remove_thread_event_breakpoints (struct process_info *proc)
|
||||
{
|
||||
struct thread_db *thread_db = proc->private->thread_db;
|
||||
struct thread_db *thread_db = proc->priv->thread_db;
|
||||
|
||||
if (thread_db->td_create_bp != NULL)
|
||||
{
|
||||
@ -959,7 +959,7 @@ remove_thread_event_breakpoints (struct process_info *proc)
|
||||
void
|
||||
thread_db_detach (struct process_info *proc)
|
||||
{
|
||||
struct thread_db *thread_db = proc->private->thread_db;
|
||||
struct thread_db *thread_db = proc->priv->thread_db;
|
||||
|
||||
if (thread_db)
|
||||
{
|
||||
@ -973,7 +973,7 @@ thread_db_detach (struct process_info *proc)
|
||||
void
|
||||
thread_db_mourn (struct process_info *proc)
|
||||
{
|
||||
struct thread_db *thread_db = proc->private->thread_db;
|
||||
struct thread_db *thread_db = proc->priv->thread_db;
|
||||
if (thread_db)
|
||||
{
|
||||
td_err_e (*td_ta_delete_p) (td_thragent_t *);
|
||||
@ -992,7 +992,7 @@ thread_db_mourn (struct process_info *proc)
|
||||
#endif /* USE_LIBTHREAD_DB_DIRECTLY */
|
||||
|
||||
free (thread_db);
|
||||
proc->private->thread_db = NULL;
|
||||
proc->priv->thread_db = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,7 @@ struct thread_info
|
||||
struct frame_id initiating_frame;
|
||||
|
||||
/* Private data used by the target vector implementation. */
|
||||
struct private_thread_info *private;
|
||||
struct private_thread_info *priv;
|
||||
|
||||
/* Function that is called to free PRIVATE. If this is NULL, then
|
||||
xfree will be called on PRIVATE. */
|
||||
|
@ -1519,7 +1519,7 @@ struct type *
|
||||
lookup_struct_elt_type (struct type *type, const char *name, int noerr)
|
||||
{
|
||||
int i;
|
||||
char *typename;
|
||||
char *type_name;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
@ -1533,9 +1533,9 @@ lookup_struct_elt_type (struct type *type, const char *name, int noerr)
|
||||
if (TYPE_CODE (type) != TYPE_CODE_STRUCT
|
||||
&& TYPE_CODE (type) != TYPE_CODE_UNION)
|
||||
{
|
||||
typename = type_to_string (type);
|
||||
make_cleanup (xfree, typename);
|
||||
error (_("Type %s is not a structure or union type."), typename);
|
||||
type_name = type_to_string (type);
|
||||
make_cleanup (xfree, type_name);
|
||||
error (_("Type %s is not a structure or union type."), type_name);
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -1544,10 +1544,10 @@ lookup_struct_elt_type (struct type *type, const char *name, int noerr)
|
||||
I.e. when doing "ptype bell->bar" for "struct foo { int bar; int
|
||||
foo; } bell;" Disabled by fnf. */
|
||||
{
|
||||
char *typename;
|
||||
char *type_name;
|
||||
|
||||
typename = type_name_no_tag (type);
|
||||
if (typename != NULL && strcmp (typename, name) == 0)
|
||||
type_name = type_name_no_tag (type);
|
||||
if (type_name != NULL && strcmp (type_name, name) == 0)
|
||||
return type;
|
||||
}
|
||||
#endif
|
||||
@ -1587,9 +1587,9 @@ lookup_struct_elt_type (struct type *type, const char *name, int noerr)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
typename = type_to_string (type);
|
||||
make_cleanup (xfree, typename);
|
||||
error (_("Type %s has no component named %s."), typename, name);
|
||||
type_name = type_to_string (type);
|
||||
make_cleanup (xfree, type_name);
|
||||
error (_("Type %s has no component named %s."), type_name, name);
|
||||
}
|
||||
|
||||
/* Store in *MAX the largest number representable by unsigned integer type
|
||||
@ -2719,7 +2719,7 @@ class_types_same_p (const struct type *a, const struct type *b)
|
||||
distance_to_ancestor (A, D, 1) = -1. */
|
||||
|
||||
static int
|
||||
distance_to_ancestor (struct type *base, struct type *dclass, int public)
|
||||
distance_to_ancestor (struct type *base, struct type *dclass, int is_public)
|
||||
{
|
||||
int i;
|
||||
int d;
|
||||
@ -2732,10 +2732,10 @@ distance_to_ancestor (struct type *base, struct type *dclass, int public)
|
||||
|
||||
for (i = 0; i < TYPE_N_BASECLASSES (dclass); i++)
|
||||
{
|
||||
if (public && ! BASETYPE_VIA_PUBLIC (dclass, i))
|
||||
if (is_public && ! BASETYPE_VIA_PUBLIC (dclass, i))
|
||||
continue;
|
||||
|
||||
d = distance_to_ancestor (base, TYPE_BASECLASS (dclass, i), public);
|
||||
d = distance_to_ancestor (base, TYPE_BASECLASS (dclass, i), is_public);
|
||||
if (d >= 0)
|
||||
return 1 + d;
|
||||
}
|
||||
@ -4190,7 +4190,7 @@ recursive_dump_type (struct type *type, int spaces)
|
||||
|
||||
struct type_pair
|
||||
{
|
||||
struct type *old, *new;
|
||||
struct type *old, *newobj;
|
||||
};
|
||||
|
||||
static hashval_t
|
||||
@ -4246,7 +4246,7 @@ copy_type_recursive (struct objfile *objfile,
|
||||
pair.old = type;
|
||||
slot = htab_find_slot (copied_types, &pair, INSERT);
|
||||
if (*slot != NULL)
|
||||
return ((struct type_pair *) *slot)->new;
|
||||
return ((struct type_pair *) *slot)->newobj;
|
||||
|
||||
new_type = alloc_type_arch (get_type_arch (type));
|
||||
|
||||
@ -4255,7 +4255,7 @@ copy_type_recursive (struct objfile *objfile,
|
||||
stored
|
||||
= obstack_alloc (&objfile->objfile_obstack, sizeof (struct type_pair));
|
||||
stored->old = type;
|
||||
stored->new = new_type;
|
||||
stored->newobj = new_type;
|
||||
*slot = stored;
|
||||
|
||||
/* Copy the common fields of types. For the main type, we simply
|
||||
|
@ -1077,7 +1077,7 @@ gnuv3_get_typeid (struct value *value)
|
||||
struct gdbarch *gdbarch;
|
||||
struct cleanup *cleanup;
|
||||
struct value *result;
|
||||
char *typename, *canonical;
|
||||
char *type_name, *canonical;
|
||||
|
||||
/* We have to handle values a bit trickily here, to allow this code
|
||||
to work properly with non_lvalue values that are really just
|
||||
@ -1096,20 +1096,20 @@ gnuv3_get_typeid (struct value *value)
|
||||
type = make_cv_type (0, 0, type, NULL);
|
||||
gdbarch = get_type_arch (type);
|
||||
|
||||
typename = type_to_string (type);
|
||||
if (typename == NULL)
|
||||
type_name = type_to_string (type);
|
||||
if (type_name == NULL)
|
||||
error (_("cannot find typeinfo for unnamed type"));
|
||||
cleanup = make_cleanup (xfree, typename);
|
||||
cleanup = make_cleanup (xfree, type_name);
|
||||
|
||||
/* We need to canonicalize the type name here, because we do lookups
|
||||
using the demangled name, and so we must match the format it
|
||||
uses. E.g., GDB tends to use "const char *" as a type name, but
|
||||
the demangler uses "char const *". */
|
||||
canonical = cp_canonicalize_string (typename);
|
||||
canonical = cp_canonicalize_string (type_name);
|
||||
if (canonical != NULL)
|
||||
{
|
||||
make_cleanup (xfree, canonical);
|
||||
typename = canonical;
|
||||
type_name = canonical;
|
||||
}
|
||||
|
||||
typeinfo_type = gnuv3_get_typeid_type (gdbarch);
|
||||
@ -1125,7 +1125,7 @@ gnuv3_get_typeid (struct value *value)
|
||||
|
||||
vtable = gnuv3_get_vtable (gdbarch, type, address);
|
||||
if (vtable == NULL)
|
||||
error (_("cannot find typeinfo for object of type '%s'"), typename);
|
||||
error (_("cannot find typeinfo for object of type '%s'"), type_name);
|
||||
typeinfo_value = value_field (vtable, vtable_field_type_info);
|
||||
result = value_ind (value_cast (make_pointer_type (typeinfo_type, NULL),
|
||||
typeinfo_value));
|
||||
@ -1135,12 +1135,12 @@ gnuv3_get_typeid (struct value *value)
|
||||
char *sym_name;
|
||||
struct bound_minimal_symbol minsym;
|
||||
|
||||
sym_name = concat ("typeinfo for ", typename, (char *) NULL);
|
||||
sym_name = concat ("typeinfo for ", type_name, (char *) NULL);
|
||||
make_cleanup (xfree, sym_name);
|
||||
minsym = lookup_minimal_symbol (sym_name, NULL, NULL);
|
||||
|
||||
if (minsym.minsym == NULL)
|
||||
error (_("could not find typeinfo symbol for '%s'"), typename);
|
||||
error (_("could not find typeinfo symbol for '%s'"), type_name);
|
||||
|
||||
result = value_at_lazy (typeinfo_type, BMSYMBOL_VALUE_ADDRESS (minsym));
|
||||
}
|
||||
@ -1188,21 +1188,21 @@ gnuv3_get_typename_from_type_info (struct value *type_info_ptr)
|
||||
static struct type *
|
||||
gnuv3_get_type_from_type_info (struct value *type_info_ptr)
|
||||
{
|
||||
char *typename;
|
||||
char *type_name;
|
||||
struct cleanup *cleanup;
|
||||
struct value *type_val;
|
||||
struct expression *expr;
|
||||
struct type *result;
|
||||
|
||||
typename = gnuv3_get_typename_from_type_info (type_info_ptr);
|
||||
cleanup = make_cleanup (xfree, typename);
|
||||
type_name = gnuv3_get_typename_from_type_info (type_info_ptr);
|
||||
cleanup = make_cleanup (xfree, type_name);
|
||||
|
||||
/* We have to parse the type name, since in general there is not a
|
||||
symbol for a type. This is somewhat bogus since there may be a
|
||||
mis-parse. Another approach might be to re-use the demangler's
|
||||
internal form to reconstruct the type somehow. */
|
||||
|
||||
expr = parse_expression (typename);
|
||||
expr = parse_expression (type_name);
|
||||
make_cleanup (xfree, expr);
|
||||
|
||||
type_val = evaluate_type (expr);
|
||||
|
@ -988,7 +988,7 @@ parse_string_or_char (const char *tokptr, const char **outptr,
|
||||
|
||||
struct token
|
||||
{
|
||||
char *operator;
|
||||
char *oper;
|
||||
int token;
|
||||
enum exp_opcode opcode;
|
||||
};
|
||||
@ -1075,7 +1075,7 @@ lex_one_token (struct parser_state *par_state)
|
||||
tokstart = lexptr;
|
||||
/* See if it is a special token of length 3. */
|
||||
for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
|
||||
if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
|
||||
if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
|
||||
{
|
||||
lexptr += 3;
|
||||
yylval.opcode = tokentab3[i].opcode;
|
||||
@ -1084,7 +1084,7 @@ lex_one_token (struct parser_state *par_state)
|
||||
|
||||
/* See if it is a special token of length 2. */
|
||||
for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
|
||||
if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
|
||||
if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
|
||||
{
|
||||
lexptr += 2;
|
||||
yylval.opcode = tokentab2[i].opcode;
|
||||
@ -1315,7 +1315,7 @@ lex_one_token (struct parser_state *par_state)
|
||||
/* Catch specific keywords. */
|
||||
copy = copy_name (yylval.sval);
|
||||
for (i = 0; i < sizeof (ident_tokens) / sizeof (ident_tokens[0]); i++)
|
||||
if (strcmp (copy, ident_tokens[i].operator) == 0)
|
||||
if (strcmp (copy, ident_tokens[i].oper) == 0)
|
||||
{
|
||||
/* It is ok to always set this, even though we don't always
|
||||
strictly need to. */
|
||||
|
@ -139,12 +139,12 @@ extern SCM gdbscm_string_string;
|
||||
|
||||
/* scm-utils.c */
|
||||
|
||||
extern void gdbscm_define_variables (const scheme_variable *, int public);
|
||||
extern void gdbscm_define_variables (const scheme_variable *, int is_public);
|
||||
|
||||
extern void gdbscm_define_functions (const scheme_function *, int public);
|
||||
extern void gdbscm_define_functions (const scheme_function *, int is_public);
|
||||
|
||||
extern void gdbscm_define_integer_constants (const scheme_integer_constant *,
|
||||
int public);
|
||||
int is_public);
|
||||
|
||||
extern void gdbscm_printf (SCM port, const char *format, ...)
|
||||
ATTRIBUTE_PRINTF (2, 3);
|
||||
|
@ -434,11 +434,11 @@ gdbscm_symbol_constant_p (SCM self)
|
||||
symbol_smob *s_smob
|
||||
= syscm_get_valid_symbol_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
||||
const struct symbol *symbol = s_smob->symbol;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
|
||||
class = SYMBOL_CLASS (symbol);
|
||||
theclass = SYMBOL_CLASS (symbol);
|
||||
|
||||
return scm_from_bool (class == LOC_CONST || class == LOC_CONST_BYTES);
|
||||
return scm_from_bool (theclass == LOC_CONST || theclass == LOC_CONST_BYTES);
|
||||
}
|
||||
|
||||
/* (symbol-function? <gdb:symbol>) -> boolean */
|
||||
@ -449,11 +449,11 @@ gdbscm_symbol_function_p (SCM self)
|
||||
symbol_smob *s_smob
|
||||
= syscm_get_valid_symbol_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
||||
const struct symbol *symbol = s_smob->symbol;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
|
||||
class = SYMBOL_CLASS (symbol);
|
||||
theclass = SYMBOL_CLASS (symbol);
|
||||
|
||||
return scm_from_bool (class == LOC_BLOCK);
|
||||
return scm_from_bool (theclass == LOC_BLOCK);
|
||||
}
|
||||
|
||||
/* (symbol-variable? <gdb:symbol>) -> boolean */
|
||||
@ -464,14 +464,14 @@ gdbscm_symbol_variable_p (SCM self)
|
||||
symbol_smob *s_smob
|
||||
= syscm_get_valid_symbol_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
|
||||
const struct symbol *symbol = s_smob->symbol;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
|
||||
class = SYMBOL_CLASS (symbol);
|
||||
theclass = SYMBOL_CLASS (symbol);
|
||||
|
||||
return scm_from_bool (!SYMBOL_IS_ARGUMENT (symbol)
|
||||
&& (class == LOC_LOCAL || class == LOC_REGISTER
|
||||
|| class == LOC_STATIC || class == LOC_COMPUTED
|
||||
|| class == LOC_OPTIMIZED_OUT));
|
||||
&& (theclass == LOC_LOCAL || theclass == LOC_REGISTER
|
||||
|| theclass == LOC_STATIC || theclass == LOC_COMPUTED
|
||||
|| theclass == LOC_OPTIMIZED_OUT));
|
||||
}
|
||||
|
||||
/* (symbol-needs-frame? <gdb:symbol>) -> boolean
|
||||
|
@ -27,14 +27,14 @@
|
||||
/* Define VARIABLES in the gdb module. */
|
||||
|
||||
void
|
||||
gdbscm_define_variables (const scheme_variable *variables, int public)
|
||||
gdbscm_define_variables (const scheme_variable *variables, int is_public)
|
||||
{
|
||||
const scheme_variable *sv;
|
||||
|
||||
for (sv = variables; sv->name != NULL; ++sv)
|
||||
{
|
||||
scm_c_define (sv->name, sv->value);
|
||||
if (public)
|
||||
if (is_public)
|
||||
scm_c_export (sv->name, NULL);
|
||||
}
|
||||
}
|
||||
@ -42,7 +42,7 @@ gdbscm_define_variables (const scheme_variable *variables, int public)
|
||||
/* Define FUNCTIONS in the gdb module. */
|
||||
|
||||
void
|
||||
gdbscm_define_functions (const scheme_function *functions, int public)
|
||||
gdbscm_define_functions (const scheme_function *functions, int is_public)
|
||||
{
|
||||
const scheme_function *sf;
|
||||
|
||||
@ -53,7 +53,7 @@ gdbscm_define_functions (const scheme_function *functions, int public)
|
||||
|
||||
scm_set_procedure_property_x (proc, gdbscm_documentation_symbol,
|
||||
gdbscm_scm_from_c_string (sf->doc_string));
|
||||
if (public)
|
||||
if (is_public)
|
||||
scm_c_export (sf->name, NULL);
|
||||
}
|
||||
}
|
||||
@ -62,14 +62,14 @@ gdbscm_define_functions (const scheme_function *functions, int public)
|
||||
|
||||
void
|
||||
gdbscm_define_integer_constants (const scheme_integer_constant *constants,
|
||||
int public)
|
||||
int is_public)
|
||||
{
|
||||
const scheme_integer_constant *sc;
|
||||
|
||||
for (sc = constants; sc->name != NULL; ++sc)
|
||||
{
|
||||
scm_c_define (sc->name, scm_from_int (sc->value));
|
||||
if (public)
|
||||
if (is_public)
|
||||
scm_c_export (sc->name, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
{
|
||||
unsigned int dummy[HPPA_MAX_INSN_PATTERN_LEN];
|
||||
int offs = 0;
|
||||
int try;
|
||||
int attempt;
|
||||
/* offsets to try to find the trampoline */
|
||||
static int pcoffs[] = { 0, 4*4, 5*4 };
|
||||
/* offsets to the rt_sigframe structure */
|
||||
@ -154,12 +154,12 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
e4008200 be,l 0x100(%sr2, %r0), %sr0, %r31
|
||||
08000240 nop */
|
||||
|
||||
for (try = 0; try < ARRAY_SIZE (pcoffs); try++)
|
||||
for (attempt = 0; attempt < ARRAY_SIZE (pcoffs); attempt++)
|
||||
{
|
||||
if (insns_match_pattern (gdbarch, sp + pcoffs[try],
|
||||
if (insns_match_pattern (gdbarch, sp + pcoffs[attempt],
|
||||
hppa_sigtramp, dummy))
|
||||
{
|
||||
offs = sfoffs[try];
|
||||
offs = sfoffs[attempt];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -171,8 +171,8 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
/* sigaltstack case: we have no way of knowing which offset to
|
||||
use in this case; default to new kernel handling. If this is
|
||||
wrong the unwinding will fail. */
|
||||
try = 2;
|
||||
sp = pc - pcoffs[try];
|
||||
attempt = 2;
|
||||
sp = pc - pcoffs[attempt];
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -186,7 +186,7 @@ hppa_linux_sigtramp_find_sigcontext (struct gdbarch *gdbarch, CORE_ADDR pc)
|
||||
bad we cannot include system specific headers :-(.
|
||||
sizeof(struct siginfo) == 128
|
||||
offsetof(struct ucontext, uc_mcontext) == 24. */
|
||||
return sp + sfoffs[try] + 128 + 24;
|
||||
return sp + sfoffs[attempt] + 128 + 24;
|
||||
}
|
||||
|
||||
struct hppa_linux_sigtramp_unwind_cache
|
||||
|
@ -512,7 +512,7 @@ fetch_instruction (CORE_ADDR addr, instruction_type *it, long long *instr)
|
||||
{
|
||||
gdb_byte bundle[BUNDLE_LEN];
|
||||
int slotnum = (int) (addr & 0x0f) / SLOT_MULTIPLIER;
|
||||
long long template;
|
||||
long long templ;
|
||||
int val;
|
||||
|
||||
/* Warn about slot numbers greater than 2. We used to generate
|
||||
@ -543,8 +543,8 @@ fetch_instruction (CORE_ADDR addr, instruction_type *it, long long *instr)
|
||||
return 0;
|
||||
|
||||
*instr = slotN_contents (bundle, slotnum);
|
||||
template = extract_bit_field (bundle, 0, 5);
|
||||
*it = template_encoding_table[(int)template][slotnum];
|
||||
templ = extract_bit_field (bundle, 0, 5);
|
||||
*it = template_encoding_table[(int)templ][slotnum];
|
||||
|
||||
if (slotnum == 2 || (slotnum == 1 && *it == L))
|
||||
addr += 16;
|
||||
@ -642,7 +642,7 @@ ia64_memory_insert_breakpoint (struct gdbarch *gdbarch,
|
||||
int slotnum = (int) (addr & 0x0f) / SLOT_MULTIPLIER, shadow_slotnum;
|
||||
long long instr_breakpoint;
|
||||
int val;
|
||||
int template;
|
||||
int templ;
|
||||
struct cleanup *cleanup;
|
||||
|
||||
if (slotnum > 2)
|
||||
@ -671,8 +671,8 @@ ia64_memory_insert_breakpoint (struct gdbarch *gdbarch,
|
||||
a breakpoint on an L-X instruction. */
|
||||
bp_tgt->shadow_len = BUNDLE_LEN - shadow_slotnum;
|
||||
|
||||
template = extract_bit_field (bundle, 0, 5);
|
||||
if (template_encoding_table[template][slotnum] == X)
|
||||
templ = extract_bit_field (bundle, 0, 5);
|
||||
if (template_encoding_table[templ][slotnum] == X)
|
||||
{
|
||||
/* X unit types can only be used in slot 2, and are actually
|
||||
part of a 2-slot L-X instruction. We cannot break at this
|
||||
@ -681,7 +681,7 @@ ia64_memory_insert_breakpoint (struct gdbarch *gdbarch,
|
||||
gdb_assert (slotnum == 2);
|
||||
error (_("Can't insert breakpoint for non-existing slot X"));
|
||||
}
|
||||
if (template_encoding_table[template][slotnum] == L)
|
||||
if (template_encoding_table[templ][slotnum] == L)
|
||||
{
|
||||
/* L unit types can only be used in slot 1. But the associated
|
||||
opcode for that instruction is in slot 2, so bump the slot number
|
||||
@ -739,7 +739,7 @@ ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
|
||||
int slotnum = (addr & 0x0f) / SLOT_MULTIPLIER, shadow_slotnum;
|
||||
long long instr_breakpoint, instr_saved;
|
||||
int val;
|
||||
int template;
|
||||
int templ;
|
||||
struct cleanup *cleanup;
|
||||
|
||||
addr &= ~0x0f;
|
||||
@ -761,8 +761,8 @@ ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
|
||||
for addressing the SHADOW_CONTENTS placement. */
|
||||
shadow_slotnum = slotnum;
|
||||
|
||||
template = extract_bit_field (bundle_mem, 0, 5);
|
||||
if (template_encoding_table[template][slotnum] == X)
|
||||
templ = extract_bit_field (bundle_mem, 0, 5);
|
||||
if (template_encoding_table[templ][slotnum] == X)
|
||||
{
|
||||
/* X unit types can only be used in slot 2, and are actually
|
||||
part of a 2-slot L-X instruction. We refuse to insert
|
||||
@ -776,7 +776,7 @@ ia64_memory_remove_breakpoint (struct gdbarch *gdbarch,
|
||||
do_cleanups (cleanup);
|
||||
return -1;
|
||||
}
|
||||
if (template_encoding_table[template][slotnum] == L)
|
||||
if (template_encoding_table[templ][slotnum] == L)
|
||||
{
|
||||
/* L unit types can only be used in slot 1. But the breakpoint
|
||||
was actually saved using slot 2, so update the slot number
|
||||
@ -829,7 +829,7 @@ ia64_breakpoint_from_pc (struct gdbarch *gdbarch,
|
||||
int slotnum = (int) (*pcptr & 0x0f) / SLOT_MULTIPLIER, shadow_slotnum;
|
||||
long long instr_fetched;
|
||||
int val;
|
||||
int template;
|
||||
int templ;
|
||||
struct cleanup *cleanup;
|
||||
|
||||
if (slotnum > 2)
|
||||
@ -857,13 +857,13 @@ ia64_breakpoint_from_pc (struct gdbarch *gdbarch,
|
||||
|
||||
/* Check for L type instruction in slot 1, if present then bump up the slot
|
||||
number to the slot 2. */
|
||||
template = extract_bit_field (bundle, 0, 5);
|
||||
if (template_encoding_table[template][slotnum] == X)
|
||||
templ = extract_bit_field (bundle, 0, 5);
|
||||
if (template_encoding_table[templ][slotnum] == X)
|
||||
{
|
||||
gdb_assert (slotnum == 2);
|
||||
error (_("Can't insert breakpoint for non-existing slot X"));
|
||||
}
|
||||
if (template_encoding_table[template][slotnum] == L)
|
||||
if (template_encoding_table[templ][slotnum] == L)
|
||||
{
|
||||
gdb_assert (slotnum == 1);
|
||||
slotnum = 2;
|
||||
|
@ -424,9 +424,9 @@ inf_ttrace_follow_fork (struct target_ops *ops, int follow_child,
|
||||
inf_ttrace_num_lwps_in_syscall = 0;
|
||||
|
||||
ti = inferior_thread ();
|
||||
ti->private =
|
||||
ti->priv =
|
||||
xmalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
memset (ti->private, 0,
|
||||
memset (ti->priv, 0,
|
||||
sizeof (struct inf_ttrace_private_thread_info));
|
||||
}
|
||||
else
|
||||
@ -610,7 +610,7 @@ inf_ttrace_create_threads_after_attach (int pid)
|
||||
/* Add the stopped thread. */
|
||||
ptid = ptid_build (pid, tts.tts_lwpid, 0);
|
||||
ti = add_thread (ptid);
|
||||
ti->private = xzalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
ti->priv = xzalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
inf_ttrace_num_lwps++;
|
||||
|
||||
/* We use the "first stopped thread" as the currently active thread. */
|
||||
@ -631,7 +631,7 @@ inf_ttrace_create_threads_after_attach (int pid)
|
||||
|
||||
ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
|
||||
ti = add_thread (ptid);
|
||||
ti->private = xzalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
ti->priv = xzalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
inf_ttrace_num_lwps++;
|
||||
}
|
||||
}
|
||||
@ -750,7 +750,7 @@ inf_ttrace_delete_dead_threads_callback (struct thread_info *info, void *arg)
|
||||
return 0;
|
||||
|
||||
lwpid = ptid_get_lwp (info->ptid);
|
||||
p = (struct inf_ttrace_private_thread_info *) info->private;
|
||||
p = (struct inf_ttrace_private_thread_info *) info->priv;
|
||||
|
||||
/* Check if an lwp that was dying is still there or not. */
|
||||
if (p->dying && (kill (lwpid, 0) == -1))
|
||||
@ -772,7 +772,7 @@ inf_ttrace_resume_lwp (struct thread_info *info, ttreq_t request, int sig)
|
||||
if (ttrace (request, pid, lwpid, TT_NOPC, sig, 0) == -1)
|
||||
{
|
||||
struct inf_ttrace_private_thread_info *p
|
||||
= (struct inf_ttrace_private_thread_info *) info->private;
|
||||
= (struct inf_ttrace_private_thread_info *) info->priv;
|
||||
if (p->dying && errno == EPROTO)
|
||||
/* This is expected, it means the dying lwp is really gone
|
||||
by now. If ttrace had an event to inform the debugger
|
||||
@ -872,10 +872,10 @@ inf_ttrace_wait (struct target_ops *ops,
|
||||
/* We haven't set the private member on the main thread yet. Do
|
||||
it now. */
|
||||
ti = find_thread_ptid (inferior_ptid);
|
||||
gdb_assert (ti != NULL && ti->private == NULL);
|
||||
ti->private =
|
||||
gdb_assert (ti != NULL && ti->priv == NULL);
|
||||
ti->priv =
|
||||
xmalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
memset (ti->private, 0,
|
||||
memset (ti->priv, 0,
|
||||
sizeof (struct inf_ttrace_private_thread_info));
|
||||
|
||||
/* Notify the core that this ptid changed. This changes
|
||||
@ -955,9 +955,9 @@ inf_ttrace_wait (struct target_ops *ops,
|
||||
lwpid = tts.tts_u.tts_thread.tts_target_lwpid;
|
||||
ptid = ptid_build (tts.tts_pid, lwpid, 0);
|
||||
ti = add_thread (ptid);
|
||||
ti->private =
|
||||
ti->priv =
|
||||
xmalloc (sizeof (struct inf_ttrace_private_thread_info));
|
||||
memset (ti->private, 0,
|
||||
memset (ti->priv, 0,
|
||||
sizeof (struct inf_ttrace_private_thread_info));
|
||||
inf_ttrace_num_lwps++;
|
||||
ptid = ptid_build (tts.tts_pid, tts.tts_lwpid, 0);
|
||||
@ -973,7 +973,7 @@ inf_ttrace_wait (struct target_ops *ops,
|
||||
printf_unfiltered (_("[%s exited]\n"), target_pid_to_str (ptid));
|
||||
ti = find_thread_ptid (ptid);
|
||||
gdb_assert (ti != NULL);
|
||||
((struct inf_ttrace_private_thread_info *)ti->private)->dying = 1;
|
||||
((struct inf_ttrace_private_thread_info *)ti->priv)->dying = 1;
|
||||
inf_ttrace_num_lwps--;
|
||||
/* Let the thread really exit. */
|
||||
ttrace (TT_LWP_CONTINUE, ptid_get_pid (ptid),
|
||||
@ -990,7 +990,7 @@ inf_ttrace_wait (struct target_ops *ops,
|
||||
target_pid_to_str (ptid));
|
||||
ti = find_thread_ptid (ptid);
|
||||
gdb_assert (ti != NULL);
|
||||
((struct inf_ttrace_private_thread_info *)ti->private)->dying = 1;
|
||||
((struct inf_ttrace_private_thread_info *)ti->priv)->dying = 1;
|
||||
inf_ttrace_num_lwps--;
|
||||
|
||||
/* Resume the lwp_terminate-caller thread. */
|
||||
@ -1146,10 +1146,10 @@ static char *
|
||||
inf_ttrace_extra_thread_info (struct target_ops *self,
|
||||
struct thread_info *info)
|
||||
{
|
||||
struct inf_ttrace_private_thread_info* private =
|
||||
(struct inf_ttrace_private_thread_info *) info->private;
|
||||
struct inf_ttrace_private_thread_info* priv =
|
||||
(struct inf_ttrace_private_thread_info *) info->priv;
|
||||
|
||||
if (private != NULL && private->dying)
|
||||
if (priv != NULL && priv->dying)
|
||||
return "Exiting";
|
||||
|
||||
return NULL;
|
||||
|
@ -101,7 +101,7 @@ free_inferior (struct inferior *inf)
|
||||
xfree (inf->terminal);
|
||||
free_environ (inf->environment);
|
||||
target_desc_info_free (inf->tdesc_info);
|
||||
xfree (inf->private);
|
||||
xfree (inf->priv);
|
||||
xfree (inf);
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,7 @@ struct inferior
|
||||
struct continuation *continuations;
|
||||
|
||||
/* Private data used by the target vector implementation. */
|
||||
struct private_inferior *private;
|
||||
struct private_inferior *priv;
|
||||
|
||||
/* HAS_EXIT_CODE is true if the inferior exited with an exit code.
|
||||
In this case, the EXIT_CODE field is also valid. */
|
||||
|
16
gdb/jit.c
16
gdb/jit.c
@ -532,15 +532,15 @@ jit_symtab_open_impl (struct gdb_symbol_callbacks *cb,
|
||||
|
||||
static int
|
||||
compare_block (const struct gdb_block *const old,
|
||||
const struct gdb_block *const new)
|
||||
const struct gdb_block *const newobj)
|
||||
{
|
||||
if (old == NULL)
|
||||
return 1;
|
||||
if (old->begin < new->begin)
|
||||
if (old->begin < newobj->begin)
|
||||
return 1;
|
||||
else if (old->begin == new->begin)
|
||||
else if (old->begin == newobj->begin)
|
||||
{
|
||||
if (old->end > new->end)
|
||||
if (old->end > newobj->end)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
@ -1220,20 +1220,20 @@ static void
|
||||
jit_frame_this_id (struct frame_info *this_frame, void **cache,
|
||||
struct frame_id *this_id)
|
||||
{
|
||||
struct jit_unwind_private private;
|
||||
struct jit_unwind_private priv;
|
||||
struct gdb_frame_id frame_id;
|
||||
struct gdb_reader_funcs *funcs;
|
||||
struct gdb_unwind_callbacks callbacks;
|
||||
|
||||
private.registers = NULL;
|
||||
private.this_frame = this_frame;
|
||||
priv.registers = NULL;
|
||||
priv.this_frame = this_frame;
|
||||
|
||||
/* We don't expect the frame_id function to set any registers, so we
|
||||
set reg_set to NULL. */
|
||||
callbacks.reg_get = jit_unwind_reg_get_impl;
|
||||
callbacks.reg_set = NULL;
|
||||
callbacks.target_read = jit_target_read_impl;
|
||||
callbacks.priv_data = &private;
|
||||
callbacks.priv_data = &priv;
|
||||
|
||||
gdb_assert (loaded_jit_reader);
|
||||
funcs = loaded_jit_reader->functions;
|
||||
|
24
gdb/jv-exp.y
24
gdb/jv-exp.y
@ -842,7 +842,7 @@ parse_number (struct parser_state *par_state,
|
||||
|
||||
struct token
|
||||
{
|
||||
char *operator;
|
||||
char *oper;
|
||||
int token;
|
||||
enum exp_opcode opcode;
|
||||
};
|
||||
@ -896,7 +896,7 @@ yylex (void)
|
||||
tokstart = lexptr;
|
||||
/* See if it is a special token of length 3. */
|
||||
for (i = 0; i < sizeof tokentab3 / sizeof tokentab3[0]; i++)
|
||||
if (strncmp (tokstart, tokentab3[i].operator, 3) == 0)
|
||||
if (strncmp (tokstart, tokentab3[i].oper, 3) == 0)
|
||||
{
|
||||
lexptr += 3;
|
||||
yylval.opcode = tokentab3[i].opcode;
|
||||
@ -905,7 +905,7 @@ yylex (void)
|
||||
|
||||
/* See if it is a special token of length 2. */
|
||||
for (i = 0; i < sizeof tokentab2 / sizeof tokentab2[0]; i++)
|
||||
if (strncmp (tokstart, tokentab2[i].operator, 2) == 0)
|
||||
if (strncmp (tokstart, tokentab2[i].oper, 2) == 0)
|
||||
{
|
||||
lexptr += 2;
|
||||
yylval.opcode = tokentab2[i].opcode;
|
||||
@ -1461,21 +1461,21 @@ static struct expression *
|
||||
copy_exp (struct expression *expr, int endpos)
|
||||
{
|
||||
int len = length_of_subexp (expr, endpos);
|
||||
struct expression *new
|
||||
= (struct expression *) malloc (sizeof (*new) + EXP_ELEM_TO_BYTES (len));
|
||||
struct expression *newobj
|
||||
= (struct expression *) malloc (sizeof (*newobj) + EXP_ELEM_TO_BYTES (len));
|
||||
|
||||
new->nelts = len;
|
||||
memcpy (new->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len));
|
||||
new->language_defn = 0;
|
||||
newobj->nelts = len;
|
||||
memcpy (newobj->elts, expr->elts + endpos - len, EXP_ELEM_TO_BYTES (len));
|
||||
newobj->language_defn = 0;
|
||||
|
||||
return new;
|
||||
return newobj;
|
||||
}
|
||||
|
||||
/* Insert the expression NEW into the current expression (expout) at POS. */
|
||||
static void
|
||||
insert_exp (struct parser_state *par_state, int pos, struct expression *new)
|
||||
insert_exp (struct parser_state *par_state, int pos, struct expression *newobj)
|
||||
{
|
||||
int newlen = new->nelts;
|
||||
int newlen = newobj->nelts;
|
||||
int i;
|
||||
|
||||
/* Grow expout if necessary. In this function's only use at present,
|
||||
@ -1485,7 +1485,7 @@ insert_exp (struct parser_state *par_state, int pos, struct expression *new)
|
||||
for (i = par_state->expout_ptr - 1; i >= pos; i--)
|
||||
par_state->expout->elts[i + newlen] = par_state->expout->elts[i];
|
||||
|
||||
memcpy (par_state->expout->elts + pos, new->elts,
|
||||
memcpy (par_state->expout->elts + pos, newobj->elts,
|
||||
EXP_ELEM_TO_BYTES (newlen));
|
||||
par_state->expout_ptr += newlen;
|
||||
}
|
||||
|
@ -394,7 +394,7 @@ have_threads_callback (struct thread_info *thread, void *args)
|
||||
if (ptid_get_pid (thread->ptid) != pid)
|
||||
return 0;
|
||||
|
||||
return thread->private != NULL;
|
||||
return thread->priv != NULL;
|
||||
}
|
||||
|
||||
static int
|
||||
@ -1241,11 +1241,11 @@ thread_db_inferior_created (struct target_ops *target, int from_tty)
|
||||
from libthread_db thread state information. */
|
||||
|
||||
static void
|
||||
update_thread_state (struct private_thread_info *private,
|
||||
update_thread_state (struct private_thread_info *priv,
|
||||
const td_thrinfo_t *ti_p)
|
||||
{
|
||||
private->dying = (ti_p->ti_state == TD_THR_UNKNOWN
|
||||
|| ti_p->ti_state == TD_THR_ZOMBIE);
|
||||
priv->dying = (ti_p->ti_state == TD_THR_UNKNOWN
|
||||
|| ti_p->ti_state == TD_THR_ZOMBIE);
|
||||
}
|
||||
|
||||
/* Attach to a new thread. This function is called when we receive a
|
||||
@ -1272,16 +1272,16 @@ attach_thread (ptid_t ptid, const td_thrhandle_t *th_p,
|
||||
tp = find_thread_ptid (ptid);
|
||||
if (tp != NULL)
|
||||
{
|
||||
/* If tp->private is NULL, then GDB is already attached to this
|
||||
/* If tp->priv is NULL, then GDB is already attached to this
|
||||
thread, but we do not know anything about it. We can learn
|
||||
about it here. This can only happen if we have some other
|
||||
way besides libthread_db to notice new threads (i.e.
|
||||
PTRACE_EVENT_CLONE); assume the same mechanism notices thread
|
||||
exit, so this can not be a stale thread recreated with the
|
||||
same ID. */
|
||||
if (tp->private != NULL)
|
||||
if (tp->priv != NULL)
|
||||
{
|
||||
if (!tp->private->dying)
|
||||
if (!tp->priv->dying)
|
||||
return 0;
|
||||
|
||||
delete_thread (ptid);
|
||||
@ -1328,7 +1328,7 @@ record_thread (struct thread_db_info *info,
|
||||
const td_thrinfo_t *ti_p)
|
||||
{
|
||||
td_err_e err;
|
||||
struct private_thread_info *private;
|
||||
struct private_thread_info *priv;
|
||||
int new_thread = (tp == NULL);
|
||||
|
||||
/* A thread ID of zero may mean the thread library has not
|
||||
@ -1338,18 +1338,18 @@ record_thread (struct thread_db_info *info,
|
||||
return;
|
||||
|
||||
/* Construct the thread's private data. */
|
||||
private = xmalloc (sizeof (struct private_thread_info));
|
||||
memset (private, 0, sizeof (struct private_thread_info));
|
||||
priv = xmalloc (sizeof (struct private_thread_info));
|
||||
memset (priv, 0, sizeof (struct private_thread_info));
|
||||
|
||||
private->th = *th_p;
|
||||
private->tid = ti_p->ti_tid;
|
||||
update_thread_state (private, ti_p);
|
||||
priv->th = *th_p;
|
||||
priv->tid = ti_p->ti_tid;
|
||||
update_thread_state (priv, ti_p);
|
||||
|
||||
/* Add the thread to GDB's thread list. */
|
||||
if (tp == NULL)
|
||||
tp = add_thread_with_info (ptid, private);
|
||||
tp = add_thread_with_info (ptid, priv);
|
||||
else
|
||||
tp->private = private;
|
||||
tp->priv = priv;
|
||||
|
||||
/* Enable thread event reporting for this thread, except when
|
||||
debugging a core file. */
|
||||
@ -1379,8 +1379,8 @@ detach_thread (ptid_t ptid)
|
||||
something re-uses its thread ID. We'll report the thread exit
|
||||
when the underlying LWP dies. */
|
||||
thread_info = find_thread_ptid (ptid);
|
||||
gdb_assert (thread_info != NULL && thread_info->private != NULL);
|
||||
thread_info->private->dying = 1;
|
||||
gdb_assert (thread_info != NULL && thread_info->priv != NULL);
|
||||
thread_info->priv->dying = 1;
|
||||
}
|
||||
|
||||
static void
|
||||
@ -1649,7 +1649,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
|
||||
ptid = ptid_build (info->pid, ti.ti_lid, 0);
|
||||
tp = find_thread_ptid (ptid);
|
||||
if (tp == NULL || tp->private == NULL)
|
||||
if (tp == NULL || tp->priv == NULL)
|
||||
{
|
||||
if (attach_thread (ptid, th_p, &ti))
|
||||
cb_data->new_threads += 1;
|
||||
@ -1666,7 +1666,7 @@ find_new_threads_callback (const td_thrhandle_t *th_p, void *data)
|
||||
{
|
||||
/* Need to update this if not using the libthread_db events
|
||||
(particularly, the TD_DEATH event). */
|
||||
update_thread_state (tp->private, &ti);
|
||||
update_thread_state (tp->priv, &ti);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1829,12 +1829,12 @@ thread_db_pid_to_str (struct target_ops *ops, ptid_t ptid)
|
||||
struct thread_info *thread_info = find_thread_ptid (ptid);
|
||||
struct target_ops *beneath;
|
||||
|
||||
if (thread_info != NULL && thread_info->private != NULL)
|
||||
if (thread_info != NULL && thread_info->priv != NULL)
|
||||
{
|
||||
static char buf[64];
|
||||
thread_t tid;
|
||||
|
||||
tid = thread_info->private->tid;
|
||||
tid = thread_info->priv->tid;
|
||||
snprintf (buf, sizeof (buf), "Thread 0x%lx (LWP %ld)",
|
||||
tid, ptid_get_lwp (ptid));
|
||||
|
||||
@ -1852,10 +1852,10 @@ static char *
|
||||
thread_db_extra_thread_info (struct target_ops *self,
|
||||
struct thread_info *info)
|
||||
{
|
||||
if (info->private == NULL)
|
||||
if (info->priv == NULL)
|
||||
return NULL;
|
||||
|
||||
if (info->private->dying)
|
||||
if (info->priv->dying)
|
||||
return "Exiting";
|
||||
|
||||
return NULL;
|
||||
@ -1880,7 +1880,7 @@ thread_db_get_thread_local_address (struct target_ops *ops,
|
||||
/* Find the matching thread. */
|
||||
thread_info = find_thread_ptid (ptid);
|
||||
|
||||
if (thread_info != NULL && thread_info->private != NULL)
|
||||
if (thread_info != NULL && thread_info->priv != NULL)
|
||||
{
|
||||
td_err_e err;
|
||||
psaddr_t address;
|
||||
@ -1899,7 +1899,7 @@ thread_db_get_thread_local_address (struct target_ops *ops,
|
||||
/* Note the cast through uintptr_t: this interface only works if
|
||||
a target address fits in a psaddr_t, which is a host pointer.
|
||||
So a 32-bit debugger can not access 64-bit TLS through this. */
|
||||
err = info->td_thr_tls_get_addr_p (&thread_info->private->th,
|
||||
err = info->td_thr_tls_get_addr_p (&thread_info->priv->th,
|
||||
(psaddr_t)(uintptr_t) lm,
|
||||
offset, &address);
|
||||
}
|
||||
@ -1917,7 +1917,7 @@ thread_db_get_thread_local_address (struct target_ops *ops,
|
||||
PR libc/16831 due to GDB PR threads/16954 LOAD_MODULE is also NULL.
|
||||
The constant number 1 depends on GNU __libc_setup_tls
|
||||
initialization of l_tls_modid to 1. */
|
||||
err = info->td_thr_tlsbase_p (&thread_info->private->th,
|
||||
err = info->td_thr_tlsbase_p (&thread_info->priv->th,
|
||||
1, &address);
|
||||
address = (char *) address + offset;
|
||||
}
|
||||
|
@ -450,7 +450,7 @@ macro_include (struct macro_source_file *source,
|
||||
int line,
|
||||
const char *included)
|
||||
{
|
||||
struct macro_source_file *new;
|
||||
struct macro_source_file *newobj;
|
||||
struct macro_source_file **link;
|
||||
|
||||
/* Find the right position in SOURCE's `includes' list for the new
|
||||
@ -496,13 +496,13 @@ macro_include (struct macro_source_file *source,
|
||||
/* At this point, we know that LINE is an unused line number, and
|
||||
*LINK points to the entry an #inclusion at that line should
|
||||
precede. */
|
||||
new = new_source_file (source->table, included);
|
||||
new->included_by = source;
|
||||
new->included_at_line = line;
|
||||
new->next_included = *link;
|
||||
*link = new;
|
||||
newobj = new_source_file (source->table, included);
|
||||
newobj->included_by = source;
|
||||
newobj->included_at_line = line;
|
||||
newobj->next_included = *link;
|
||||
*link = newobj;
|
||||
|
||||
return new;
|
||||
return newobj;
|
||||
}
|
||||
|
||||
|
||||
|
@ -430,24 +430,24 @@ static struct parse_stack
|
||||
static void
|
||||
push_parse_stack (void)
|
||||
{
|
||||
struct parse_stack *new;
|
||||
struct parse_stack *newobj;
|
||||
|
||||
/* Reuse frames if possible. */
|
||||
if (top_stack && top_stack->prev)
|
||||
new = top_stack->prev;
|
||||
newobj = top_stack->prev;
|
||||
else
|
||||
new = (struct parse_stack *) xzalloc (sizeof (struct parse_stack));
|
||||
newobj = (struct parse_stack *) xzalloc (sizeof (struct parse_stack));
|
||||
/* Initialize new frame with previous content. */
|
||||
if (top_stack)
|
||||
{
|
||||
struct parse_stack *prev = new->prev;
|
||||
struct parse_stack *prev = newobj->prev;
|
||||
|
||||
*new = *top_stack;
|
||||
top_stack->prev = new;
|
||||
new->prev = prev;
|
||||
new->next = top_stack;
|
||||
*newobj = *top_stack;
|
||||
top_stack->prev = newobj;
|
||||
newobj->prev = prev;
|
||||
newobj->next = top_stack;
|
||||
}
|
||||
top_stack = new;
|
||||
top_stack = newobj;
|
||||
}
|
||||
|
||||
/* Exit a lexical context. */
|
||||
@ -559,7 +559,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
||||
struct type *t;
|
||||
struct field *f;
|
||||
int count = 1;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
TIR tir;
|
||||
long svalue = sh->value;
|
||||
int bitsize;
|
||||
@ -600,7 +600,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
||||
break;
|
||||
|
||||
case stGlobal: /* External symbol, goes into global block. */
|
||||
class = LOC_STATIC;
|
||||
theclass = LOC_STATIC;
|
||||
b = BLOCKVECTOR_BLOCK (SYMTAB_BLOCKVECTOR (top_stack->cur_st),
|
||||
GLOBAL_BLOCK);
|
||||
s = new_symbol (name);
|
||||
@ -608,7 +608,7 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
||||
goto data;
|
||||
|
||||
case stStatic: /* Static data, goes into current block. */
|
||||
class = LOC_STATIC;
|
||||
theclass = LOC_STATIC;
|
||||
b = top_stack->cur_block;
|
||||
s = new_symbol (name);
|
||||
if (SC_IS_COMMON (sh->sc))
|
||||
@ -629,13 +629,13 @@ parse_symbol (SYMR *sh, union aux_ext *ax, char *ext_sh, int bigend,
|
||||
s = new_symbol (name);
|
||||
SYMBOL_VALUE (s) = svalue;
|
||||
if (sh->sc == scRegister)
|
||||
class = mdebug_register_index;
|
||||
theclass = mdebug_register_index;
|
||||
else
|
||||
class = LOC_LOCAL;
|
||||
theclass = LOC_LOCAL;
|
||||
|
||||
data: /* Common code for symbols describing data. */
|
||||
SYMBOL_DOMAIN (s) = VAR_DOMAIN;
|
||||
SYMBOL_ACLASS_INDEX (s) = class;
|
||||
SYMBOL_ACLASS_INDEX (s) = theclass;
|
||||
add_symbol (s, top_stack->cur_st, b);
|
||||
|
||||
/* Type could be missing if file is compiled without debugging info. */
|
||||
@ -3416,7 +3416,7 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
for (cur_sdx = 0; cur_sdx < fh->csym;)
|
||||
{
|
||||
char *name;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
CORE_ADDR minsym_value;
|
||||
|
||||
(*swap_sym_in) (cur_bfd,
|
||||
@ -3572,7 +3572,7 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
mst_file_bss,
|
||||
SECT_OFF_BSS (objfile),
|
||||
objfile);
|
||||
class = LOC_STATIC;
|
||||
theclass = LOC_STATIC;
|
||||
break;
|
||||
|
||||
case stIndirect: /* Irix5 forward declaration */
|
||||
@ -3584,11 +3584,11 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
structs from alpha and mips cc. */
|
||||
if (sh.iss == 0 || has_opaque_xref (fh, &sh))
|
||||
goto skip;
|
||||
class = LOC_TYPEDEF;
|
||||
theclass = LOC_TYPEDEF;
|
||||
break;
|
||||
|
||||
case stConstant: /* Constant decl */
|
||||
class = LOC_CONST;
|
||||
theclass = LOC_CONST;
|
||||
break;
|
||||
|
||||
case stUnion:
|
||||
@ -3644,7 +3644,7 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
}
|
||||
/* Use this gdb symbol. */
|
||||
add_psymbol_to_list (name, strlen (name), 1,
|
||||
VAR_DOMAIN, class,
|
||||
VAR_DOMAIN, theclass,
|
||||
&objfile->static_psymbols,
|
||||
0, sh.value, psymtab_language, objfile);
|
||||
skip:
|
||||
@ -3658,7 +3658,7 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
PST_PRIVATE (save_pst)->extern_tab = ext_ptr;
|
||||
for (; --cur_sdx >= 0; ext_ptr++)
|
||||
{
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
SYMR *psh;
|
||||
char *name;
|
||||
CORE_ADDR svalue;
|
||||
@ -3708,7 +3708,7 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
Ignore them, as parse_external will ignore them too. */
|
||||
continue;
|
||||
case stLabel:
|
||||
class = LOC_LABEL;
|
||||
theclass = LOC_LABEL;
|
||||
break;
|
||||
default:
|
||||
unknown_ext_complaint (debug_info->ssext + psh->iss);
|
||||
@ -3719,12 +3719,12 @@ parse_partial_symbols (struct objfile *objfile)
|
||||
if (SC_IS_COMMON (psh->sc))
|
||||
continue;
|
||||
|
||||
class = LOC_STATIC;
|
||||
theclass = LOC_STATIC;
|
||||
break;
|
||||
}
|
||||
name = debug_info->ssext + psh->iss;
|
||||
add_psymbol_to_list (name, strlen (name), 1,
|
||||
VAR_DOMAIN, class,
|
||||
VAR_DOMAIN, theclass,
|
||||
&objfile->global_psymbols,
|
||||
0, svalue,
|
||||
psymtab_language, objfile);
|
||||
@ -4568,7 +4568,7 @@ cross_ref (int fd, union aux_ext *ax, struct type **tpp,
|
||||
|
||||
static struct symbol *
|
||||
mylookup_symbol (char *name, const struct block *block,
|
||||
domain_enum domain, enum address_class class)
|
||||
domain_enum domain, enum address_class theclass)
|
||||
{
|
||||
struct block_iterator iter;
|
||||
int inc;
|
||||
@ -4579,14 +4579,14 @@ mylookup_symbol (char *name, const struct block *block,
|
||||
{
|
||||
if (SYMBOL_LINKAGE_NAME (sym)[0] == inc
|
||||
&& SYMBOL_DOMAIN (sym) == domain
|
||||
&& SYMBOL_CLASS (sym) == class
|
||||
&& SYMBOL_CLASS (sym) == theclass
|
||||
&& strcmp (SYMBOL_LINKAGE_NAME (sym), name) == 0)
|
||||
return sym;
|
||||
}
|
||||
|
||||
block = BLOCK_SUPERBLOCK (block);
|
||||
if (block)
|
||||
return mylookup_symbol (name, block, domain, class);
|
||||
return mylookup_symbol (name, block, domain, theclass);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -112,11 +112,11 @@ mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
|
||||
/* Allocate a new memory region, with default settings. */
|
||||
|
||||
void
|
||||
mem_region_init (struct mem_region *new)
|
||||
mem_region_init (struct mem_region *newobj)
|
||||
{
|
||||
memset (new, 0, sizeof (struct mem_region));
|
||||
new->enabled_p = 1;
|
||||
new->attrib = default_mem_attrib;
|
||||
memset (newobj, 0, sizeof (struct mem_region));
|
||||
newobj->enabled_p = 1;
|
||||
newobj->attrib = default_mem_attrib;
|
||||
}
|
||||
|
||||
/* This function should be called before any command which would
|
||||
@ -174,7 +174,7 @@ static void
|
||||
create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
|
||||
const struct mem_attrib *attrib)
|
||||
{
|
||||
struct mem_region new;
|
||||
struct mem_region newobj;
|
||||
int i, ix;
|
||||
|
||||
/* lo == hi is a useless empty region. */
|
||||
@ -184,11 +184,11 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
|
||||
return;
|
||||
}
|
||||
|
||||
mem_region_init (&new);
|
||||
new.lo = lo;
|
||||
new.hi = hi;
|
||||
mem_region_init (&newobj);
|
||||
newobj.lo = lo;
|
||||
newobj.hi = hi;
|
||||
|
||||
ix = VEC_lower_bound (mem_region_s, mem_region_list, &new,
|
||||
ix = VEC_lower_bound (mem_region_s, mem_region_list, &newobj,
|
||||
mem_region_lessthan);
|
||||
|
||||
/* Check for an overlapping memory region. We only need to check
|
||||
@ -214,9 +214,9 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
|
||||
}
|
||||
}
|
||||
|
||||
new.number = ++mem_number;
|
||||
new.attrib = *attrib;
|
||||
VEC_safe_insert (mem_region_s, mem_region_list, ix, &new);
|
||||
newobj.number = ++mem_number;
|
||||
newobj.attrib = *attrib;
|
||||
VEC_safe_insert (mem_region_s, mem_region_list, ix, &newobj);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -35,7 +35,7 @@ extern unsigned int varobjdebug; /* defined in varobj.c. */
|
||||
|
||||
static void varobj_update_one (struct varobj *var,
|
||||
enum print_values print_values,
|
||||
int explicit);
|
||||
int is_explicit);
|
||||
|
||||
static int mi_print_value_p (struct varobj *var,
|
||||
enum print_values print_values);
|
||||
@ -730,14 +730,14 @@ mi_cmd_var_update (char *command, char **argv, int argc)
|
||||
|
||||
static void
|
||||
varobj_update_one (struct varobj *var, enum print_values print_values,
|
||||
int explicit)
|
||||
int is_explicit)
|
||||
{
|
||||
struct ui_out *uiout = current_uiout;
|
||||
VEC (varobj_update_result) *changes;
|
||||
varobj_update_result *r;
|
||||
int i;
|
||||
|
||||
changes = varobj_update (&var, explicit);
|
||||
changes = varobj_update (&var, is_explicit);
|
||||
|
||||
for (i = 0; VEC_iterate (varobj_update_result, changes, i, r); ++i)
|
||||
{
|
||||
@ -803,14 +803,14 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
|
||||
ui_out_field_int (uiout, "has_more",
|
||||
varobj_has_more (r->varobj, to));
|
||||
|
||||
if (r->new)
|
||||
if (r->newobj)
|
||||
{
|
||||
int j;
|
||||
varobj_p child;
|
||||
struct cleanup *cleanup;
|
||||
|
||||
cleanup = make_cleanup_ui_out_list_begin_end (uiout, "new_children");
|
||||
for (j = 0; VEC_iterate (varobj_p, r->new, j, child); ++j)
|
||||
for (j = 0; VEC_iterate (varobj_p, r->newobj, j, child); ++j)
|
||||
{
|
||||
struct cleanup *cleanup_child;
|
||||
|
||||
@ -821,8 +821,8 @@ varobj_update_one (struct varobj *var, enum print_values print_values,
|
||||
}
|
||||
|
||||
do_cleanups (cleanup);
|
||||
VEC_free (varobj_p, r->new);
|
||||
r->new = NULL; /* Paranoia. */
|
||||
VEC_free (varobj_p, r->newobj);
|
||||
r->newobj = NULL; /* Paranoia. */
|
||||
}
|
||||
|
||||
do_cleanups (cleanup);
|
||||
|
@ -550,7 +550,7 @@ lookup_minimal_symbol_by_pc_section_1 (CORE_ADDR pc_in,
|
||||
{
|
||||
int lo;
|
||||
int hi;
|
||||
int new;
|
||||
int newobj;
|
||||
struct objfile *objfile;
|
||||
struct minimal_symbol *msymbol;
|
||||
struct minimal_symbol *best_symbol = NULL;
|
||||
@ -617,15 +617,15 @@ lookup_minimal_symbol_by_pc_section_1 (CORE_ADDR pc_in,
|
||||
{
|
||||
/* pc is still strictly less than highest address. */
|
||||
/* Note "new" will always be >= lo. */
|
||||
new = (lo + hi) / 2;
|
||||
if ((MSYMBOL_VALUE_RAW_ADDRESS (&msymbol[new]) >= pc)
|
||||
|| (lo == new))
|
||||
newobj = (lo + hi) / 2;
|
||||
if ((MSYMBOL_VALUE_RAW_ADDRESS (&msymbol[newobj]) >= pc)
|
||||
|| (lo == newobj))
|
||||
{
|
||||
hi = new;
|
||||
hi = newobj;
|
||||
}
|
||||
else
|
||||
{
|
||||
lo = new;
|
||||
lo = newobj;
|
||||
}
|
||||
}
|
||||
|
||||
@ -975,7 +975,7 @@ prim_record_minimal_symbol_full (const char *name, int name_len, int copy_name,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
struct obj_section *obj_section;
|
||||
struct msym_bunch *new;
|
||||
struct msym_bunch *newobj;
|
||||
struct minimal_symbol *msymbol;
|
||||
|
||||
/* Don't put gcc_compiled, __gnu_compiled_cplus, and friends into
|
||||
@ -1001,10 +1001,10 @@ prim_record_minimal_symbol_full (const char *name, int name_len, int copy_name,
|
||||
|
||||
if (msym_bunch_index == BUNCH_SIZE)
|
||||
{
|
||||
new = XCNEW (struct msym_bunch);
|
||||
newobj = XCNEW (struct msym_bunch);
|
||||
msym_bunch_index = 0;
|
||||
new->next = msym_bunch;
|
||||
msym_bunch = new;
|
||||
newobj->next = msym_bunch;
|
||||
msym_bunch = newobj;
|
||||
}
|
||||
msymbol = &msym_bunch->contents[msym_bunch_index];
|
||||
MSYMBOL_SET_LANGUAGE (msymbol, language_auto,
|
||||
|
@ -407,8 +407,8 @@ x86_handle_nonaligned_watchpoint (struct x86_debug_reg_state *state,
|
||||
int align = addr % max_wp_len;
|
||||
/* Four (eight on AMD64) is the maximum length a debug register
|
||||
can watch. */
|
||||
int try = (len > max_wp_len ? (max_wp_len - 1) : len - 1);
|
||||
int size = size_try_array[try][align];
|
||||
int attempt = (len > max_wp_len ? (max_wp_len - 1) : len - 1);
|
||||
int size = size_try_array[attempt][align];
|
||||
|
||||
if (what == WP_COUNT)
|
||||
{
|
||||
|
@ -247,24 +247,24 @@ update_thread_private_data_name (struct thread_info *new_thread,
|
||||
gdb_assert (newname != NULL);
|
||||
gdb_assert (new_thread != NULL);
|
||||
newnamelen = strlen (newname);
|
||||
if (!new_thread->private)
|
||||
if (!new_thread->priv)
|
||||
{
|
||||
new_thread->private = xmalloc (offsetof (struct private_thread_info,
|
||||
new_thread->priv = xmalloc (offsetof (struct private_thread_info,
|
||||
name)
|
||||
+ newnamelen + 1);
|
||||
memcpy (new_thread->private->name, newname, newnamelen + 1);
|
||||
memcpy (new_thread->priv->name, newname, newnamelen + 1);
|
||||
}
|
||||
else if (strcmp (newname, new_thread->private->name) != 0)
|
||||
else if (strcmp (newname, new_thread->priv->name) != 0)
|
||||
{
|
||||
/* Reallocate if neccessary. */
|
||||
int oldnamelen = strlen (new_thread->private->name);
|
||||
int oldnamelen = strlen (new_thread->priv->name);
|
||||
|
||||
if (oldnamelen < newnamelen)
|
||||
new_thread->private = xrealloc (new_thread->private,
|
||||
new_thread->priv = xrealloc (new_thread->priv,
|
||||
offsetof (struct private_thread_info,
|
||||
name)
|
||||
+ newnamelen + 1);
|
||||
memcpy (new_thread->private->name, newname, newnamelen + 1);
|
||||
memcpy (new_thread->priv->name, newname, newnamelen + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -299,7 +299,7 @@ update_thread_private_data (struct thread_info *new_thread,
|
||||
|
||||
update_thread_private_data_name (new_thread, tn->name_buf);
|
||||
|
||||
pti = (struct private_thread_info *) new_thread->private;
|
||||
pti = (struct private_thread_info *) new_thread->priv;
|
||||
pti->tid = tid;
|
||||
pti->state = state;
|
||||
pti->flags = flags;
|
||||
|
@ -364,9 +364,9 @@ static const char *nto_thread_state_str[] =
|
||||
char *
|
||||
nto_extra_thread_info (struct target_ops *self, struct thread_info *ti)
|
||||
{
|
||||
if (ti && ti->private
|
||||
&& ti->private->state < ARRAY_SIZE (nto_thread_state_str))
|
||||
return (char *)nto_thread_state_str [ti->private->state];
|
||||
if (ti && ti->priv
|
||||
&& ti->priv->state < ARRAY_SIZE (nto_thread_state_str))
|
||||
return (char *)nto_thread_state_str [ti->priv->state];
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ struct objc_class {
|
||||
|
||||
struct objc_super {
|
||||
CORE_ADDR receiver;
|
||||
CORE_ADDR class;
|
||||
CORE_ADDR theclass;
|
||||
};
|
||||
|
||||
struct objc_method {
|
||||
@ -413,16 +413,16 @@ static char *msglist_sel;
|
||||
void
|
||||
start_msglist(void)
|
||||
{
|
||||
struct selname *new =
|
||||
struct selname *newobj =
|
||||
(struct selname *) xmalloc (sizeof (struct selname));
|
||||
|
||||
new->next = selname_chain;
|
||||
new->msglist_len = msglist_len;
|
||||
new->msglist_sel = msglist_sel;
|
||||
newobj->next = selname_chain;
|
||||
newobj->msglist_len = msglist_len;
|
||||
newobj->msglist_sel = msglist_sel;
|
||||
msglist_len = 0;
|
||||
msglist_sel = (char *)xmalloc(1);
|
||||
*msglist_sel = 0;
|
||||
selname_chain = new;
|
||||
selname_chain = newobj;
|
||||
}
|
||||
|
||||
void
|
||||
@ -856,7 +856,7 @@ parse_selector (char *method, char **selector)
|
||||
}
|
||||
|
||||
static char *
|
||||
parse_method (char *method, char *type, char **class,
|
||||
parse_method (char *method, char *type, char **theclass,
|
||||
char **category, char **selector)
|
||||
{
|
||||
char *s1 = NULL;
|
||||
@ -869,7 +869,7 @@ parse_method (char *method, char *type, char **class,
|
||||
char *nselector = NULL;
|
||||
|
||||
gdb_assert (type != NULL);
|
||||
gdb_assert (class != NULL);
|
||||
gdb_assert (theclass != NULL);
|
||||
gdb_assert (category != NULL);
|
||||
gdb_assert (selector != NULL);
|
||||
|
||||
@ -941,8 +941,8 @@ parse_method (char *method, char *type, char **class,
|
||||
|
||||
if (type != NULL)
|
||||
*type = ntype;
|
||||
if (class != NULL)
|
||||
*class = nclass;
|
||||
if (theclass != NULL)
|
||||
*theclass = nclass;
|
||||
if (category != NULL)
|
||||
*category = ncategory;
|
||||
if (selector != NULL)
|
||||
@ -952,7 +952,7 @@ parse_method (char *method, char *type, char **class,
|
||||
}
|
||||
|
||||
static void
|
||||
find_methods (char type, const char *class, const char *category,
|
||||
find_methods (char type, const char *theclass, const char *category,
|
||||
const char *selector,
|
||||
VEC (const_char_ptr) **symbol_names)
|
||||
{
|
||||
@ -1018,8 +1018,8 @@ find_methods (char type, const char *class, const char *category,
|
||||
if ((type != '\0') && (ntype != type))
|
||||
continue;
|
||||
|
||||
if ((class != NULL)
|
||||
&& ((nclass == NULL) || (strcmp (class, nclass) != 0)))
|
||||
if ((theclass != NULL)
|
||||
&& ((nclass == NULL) || (strcmp (theclass, nclass) != 0)))
|
||||
continue;
|
||||
|
||||
if ((category != NULL) &&
|
||||
@ -1112,7 +1112,7 @@ const char *
|
||||
find_imps (const char *method, VEC (const_char_ptr) **symbol_names)
|
||||
{
|
||||
char type = '\0';
|
||||
char *class = NULL;
|
||||
char *theclass = NULL;
|
||||
char *category = NULL;
|
||||
char *selector = NULL;
|
||||
|
||||
@ -1125,7 +1125,7 @@ find_imps (const char *method, VEC (const_char_ptr) **symbol_names)
|
||||
|
||||
buf = (char *) alloca (strlen (method) + 1);
|
||||
strcpy (buf, method);
|
||||
tmp = parse_method (buf, &type, &class, &category, &selector);
|
||||
tmp = parse_method (buf, &type, &theclass, &category, &selector);
|
||||
|
||||
if (tmp == NULL)
|
||||
{
|
||||
@ -1138,7 +1138,7 @@ find_imps (const char *method, VEC (const_char_ptr) **symbol_names)
|
||||
selector_case = 1;
|
||||
}
|
||||
|
||||
find_methods (type, class, category, selector, symbol_names);
|
||||
find_methods (type, theclass, category, selector, symbol_names);
|
||||
|
||||
/* If we hit the "selector" case, and we found some methods, then
|
||||
add the selector itself as a symbol, if it exists. */
|
||||
@ -1417,34 +1417,34 @@ read_objc_super (struct gdbarch *gdbarch, CORE_ADDR addr,
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
super->receiver = read_memory_unsigned_integer (addr, 4, byte_order);
|
||||
super->class = read_memory_unsigned_integer (addr + 4, 4, byte_order);
|
||||
super->theclass = read_memory_unsigned_integer (addr + 4, 4, byte_order);
|
||||
};
|
||||
|
||||
static void
|
||||
read_objc_class (struct gdbarch *gdbarch, CORE_ADDR addr,
|
||||
struct objc_class *class)
|
||||
struct objc_class *theclass)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
|
||||
class->isa = read_memory_unsigned_integer (addr, 4, byte_order);
|
||||
class->super_class = read_memory_unsigned_integer (addr + 4, 4, byte_order);
|
||||
class->name = read_memory_unsigned_integer (addr + 8, 4, byte_order);
|
||||
class->version = read_memory_unsigned_integer (addr + 12, 4, byte_order);
|
||||
class->info = read_memory_unsigned_integer (addr + 16, 4, byte_order);
|
||||
class->instance_size = read_memory_unsigned_integer (addr + 18, 4,
|
||||
theclass->isa = read_memory_unsigned_integer (addr, 4, byte_order);
|
||||
theclass->super_class = read_memory_unsigned_integer (addr + 4, 4, byte_order);
|
||||
theclass->name = read_memory_unsigned_integer (addr + 8, 4, byte_order);
|
||||
theclass->version = read_memory_unsigned_integer (addr + 12, 4, byte_order);
|
||||
theclass->info = read_memory_unsigned_integer (addr + 16, 4, byte_order);
|
||||
theclass->instance_size = read_memory_unsigned_integer (addr + 18, 4,
|
||||
byte_order);
|
||||
class->ivars = read_memory_unsigned_integer (addr + 24, 4, byte_order);
|
||||
class->methods = read_memory_unsigned_integer (addr + 28, 4, byte_order);
|
||||
class->cache = read_memory_unsigned_integer (addr + 32, 4, byte_order);
|
||||
class->protocols = read_memory_unsigned_integer (addr + 36, 4, byte_order);
|
||||
theclass->ivars = read_memory_unsigned_integer (addr + 24, 4, byte_order);
|
||||
theclass->methods = read_memory_unsigned_integer (addr + 28, 4, byte_order);
|
||||
theclass->cache = read_memory_unsigned_integer (addr + 32, 4, byte_order);
|
||||
theclass->protocols = read_memory_unsigned_integer (addr + 36, 4, byte_order);
|
||||
}
|
||||
|
||||
static CORE_ADDR
|
||||
find_implementation_from_class (struct gdbarch *gdbarch,
|
||||
CORE_ADDR class, CORE_ADDR sel)
|
||||
CORE_ADDR theclass, CORE_ADDR sel)
|
||||
{
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
CORE_ADDR subclass = class;
|
||||
CORE_ADDR subclass = theclass;
|
||||
|
||||
while (subclass != 0)
|
||||
{
|
||||
@ -1563,10 +1563,10 @@ resolve_msgsend_super (CORE_ADDR pc, CORE_ADDR *new_pc)
|
||||
sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 1, ptr_type);
|
||||
|
||||
read_objc_super (gdbarch, super, &sstr);
|
||||
if (sstr.class == 0)
|
||||
if (sstr.theclass == 0)
|
||||
return 0;
|
||||
|
||||
res = find_implementation_from_class (gdbarch, sstr.class, sel);
|
||||
res = find_implementation_from_class (gdbarch, sstr.theclass, sel);
|
||||
if (new_pc != 0)
|
||||
*new_pc = res;
|
||||
if (res == 0)
|
||||
@ -1591,10 +1591,10 @@ resolve_msgsend_super_stret (CORE_ADDR pc, CORE_ADDR *new_pc)
|
||||
sel = gdbarch_fetch_pointer_argument (gdbarch, frame, 2, ptr_type);
|
||||
|
||||
read_objc_super (gdbarch, super, &sstr);
|
||||
if (sstr.class == 0)
|
||||
if (sstr.theclass == 0)
|
||||
return 0;
|
||||
|
||||
res = find_implementation_from_class (gdbarch, sstr.class, sel);
|
||||
res = find_implementation_from_class (gdbarch, sstr.theclass, sel);
|
||||
if (new_pc != 0)
|
||||
*new_pc = res;
|
||||
if (res == 0)
|
||||
|
10
gdb/p-exp.y
10
gdb/p-exp.y
@ -1103,7 +1103,7 @@ pop_current_type (void)
|
||||
|
||||
struct token
|
||||
{
|
||||
char *operator;
|
||||
char *oper;
|
||||
int token;
|
||||
enum exp_opcode opcode;
|
||||
};
|
||||
@ -1173,8 +1173,8 @@ yylex (void)
|
||||
/* See if it is a special token of length 3. */
|
||||
if (explen > 2)
|
||||
for (i = 0; i < sizeof (tokentab3) / sizeof (tokentab3[0]); i++)
|
||||
if (strncasecmp (tokstart, tokentab3[i].operator, 3) == 0
|
||||
&& (!isalpha (tokentab3[i].operator[0]) || explen == 3
|
||||
if (strncasecmp (tokstart, tokentab3[i].oper, 3) == 0
|
||||
&& (!isalpha (tokentab3[i].oper[0]) || explen == 3
|
||||
|| (!isalpha (tokstart[3])
|
||||
&& !isdigit (tokstart[3]) && tokstart[3] != '_')))
|
||||
{
|
||||
@ -1186,8 +1186,8 @@ yylex (void)
|
||||
/* See if it is a special token of length 2. */
|
||||
if (explen > 1)
|
||||
for (i = 0; i < sizeof (tokentab2) / sizeof (tokentab2[0]); i++)
|
||||
if (strncasecmp (tokstart, tokentab2[i].operator, 2) == 0
|
||||
&& (!isalpha (tokentab2[i].operator[0]) || explen == 2
|
||||
if (strncasecmp (tokstart, tokentab2[i].oper, 2) == 0
|
||||
&& (!isalpha (tokentab2[i].oper[0]) || explen == 2
|
||||
|| (!isalpha (tokstart[2])
|
||||
&& !isdigit (tokstart[2]) && tokstart[2] != '_')))
|
||||
{
|
||||
|
@ -483,10 +483,10 @@ const char pascal_vtbl_ptr_name[] =
|
||||
int
|
||||
pascal_object_is_vtbl_ptr_type (struct type *type)
|
||||
{
|
||||
const char *typename = type_name_no_tag (type);
|
||||
const char *type_name = type_name_no_tag (type);
|
||||
|
||||
return (typename != NULL
|
||||
&& strcmp (typename, pascal_vtbl_ptr_name) == 0);
|
||||
return (type_name != NULL
|
||||
&& strcmp (type_name, pascal_vtbl_ptr_name) == 0);
|
||||
}
|
||||
|
||||
/* Return truth value for the assertion that TYPE is of the type
|
||||
|
10
gdb/parse.c
10
gdb/parse.c
@ -140,13 +140,13 @@ static struct funcall *funcall_chain;
|
||||
void
|
||||
start_arglist (void)
|
||||
{
|
||||
struct funcall *new;
|
||||
struct funcall *newobj;
|
||||
|
||||
new = (struct funcall *) xmalloc (sizeof (struct funcall));
|
||||
new->next = funcall_chain;
|
||||
new->arglist_len = arglist_len;
|
||||
newobj = (struct funcall *) xmalloc (sizeof (struct funcall));
|
||||
newobj->next = funcall_chain;
|
||||
newobj->arglist_len = arglist_len;
|
||||
arglist_len = 0;
|
||||
funcall_chain = new;
|
||||
funcall_chain = newobj;
|
||||
}
|
||||
|
||||
/* Return the number of arguments in a function call just terminated,
|
||||
|
@ -114,7 +114,7 @@ struct objc_class_str
|
||||
{
|
||||
struct stoken stoken;
|
||||
struct type *type;
|
||||
int class;
|
||||
int theclass;
|
||||
};
|
||||
|
||||
typedef struct type *type_ptr;
|
||||
|
@ -1496,7 +1496,7 @@ display_command (char *arg, int from_tty)
|
||||
{
|
||||
struct format_data fmt;
|
||||
struct expression *expr;
|
||||
struct display *new;
|
||||
struct display *newobj;
|
||||
int display_it = 1;
|
||||
const char *exp = arg;
|
||||
|
||||
@ -1535,20 +1535,20 @@ display_command (char *arg, int from_tty)
|
||||
innermost_block = NULL;
|
||||
expr = parse_expression (exp);
|
||||
|
||||
new = (struct display *) xmalloc (sizeof (struct display));
|
||||
newobj = (struct display *) xmalloc (sizeof (struct display));
|
||||
|
||||
new->exp_string = xstrdup (exp);
|
||||
new->exp = expr;
|
||||
new->block = innermost_block;
|
||||
new->pspace = current_program_space;
|
||||
new->next = display_chain;
|
||||
new->number = ++display_number;
|
||||
new->format = fmt;
|
||||
new->enabled_p = 1;
|
||||
display_chain = new;
|
||||
newobj->exp_string = xstrdup (exp);
|
||||
newobj->exp = expr;
|
||||
newobj->block = innermost_block;
|
||||
newobj->pspace = current_program_space;
|
||||
newobj->next = display_chain;
|
||||
newobj->number = ++display_number;
|
||||
newobj->format = fmt;
|
||||
newobj->enabled_p = 1;
|
||||
display_chain = newobj;
|
||||
|
||||
if (from_tty)
|
||||
do_one_display (new);
|
||||
do_one_display (newobj);
|
||||
|
||||
dont_repeat ();
|
||||
}
|
||||
|
@ -1247,13 +1247,13 @@ psymtab_to_fullname (struct partial_symtab *ps)
|
||||
return ps->fullname;
|
||||
}
|
||||
|
||||
/* For all symbols, s, in BLOCK that are in NAMESPACE and match NAME
|
||||
/* For all symbols, s, in BLOCK that are in DOMAIN and match NAME
|
||||
according to the function MATCH, call CALLBACK(BLOCK, s, DATA).
|
||||
BLOCK is assumed to come from OBJFILE. Returns 1 iff CALLBACK
|
||||
ever returns non-zero, and otherwise returns 0. */
|
||||
|
||||
static int
|
||||
map_block (const char *name, domain_enum namespace, struct objfile *objfile,
|
||||
map_block (const char *name, domain_enum domain, struct objfile *objfile,
|
||||
struct block *block,
|
||||
int (*callback) (struct block *, struct symbol *, void *),
|
||||
void *data, symbol_compare_ftype *match)
|
||||
@ -1265,7 +1265,7 @@ map_block (const char *name, domain_enum namespace, struct objfile *objfile,
|
||||
sym != NULL; sym = block_iter_match_next (name, match, &iter))
|
||||
{
|
||||
if (symbol_matches_domain (SYMBOL_LANGUAGE (sym),
|
||||
SYMBOL_DOMAIN (sym), namespace))
|
||||
SYMBOL_DOMAIN (sym), domain))
|
||||
{
|
||||
if (callback (block, sym, data))
|
||||
return 1;
|
||||
@ -1280,7 +1280,7 @@ map_block (const char *name, domain_enum namespace, struct objfile *objfile,
|
||||
|
||||
static void
|
||||
psym_map_matching_symbols (struct objfile *objfile,
|
||||
const char *name, domain_enum namespace,
|
||||
const char *name, domain_enum domain,
|
||||
int global,
|
||||
int (*callback) (struct block *,
|
||||
struct symbol *, void *),
|
||||
@ -1295,7 +1295,7 @@ psym_map_matching_symbols (struct objfile *objfile,
|
||||
{
|
||||
QUIT;
|
||||
if (ps->readin
|
||||
|| match_partial_symbol (objfile, ps, global, name, namespace, match,
|
||||
|| match_partial_symbol (objfile, ps, global, name, domain, match,
|
||||
ordered_compare))
|
||||
{
|
||||
struct compunit_symtab *cust = psymtab_to_symtab (objfile, ps);
|
||||
@ -1304,7 +1304,7 @@ psym_map_matching_symbols (struct objfile *objfile,
|
||||
if (cust == NULL)
|
||||
continue;
|
||||
block = BLOCKVECTOR_BLOCK (COMPUNIT_BLOCKVECTOR (cust), block_kind);
|
||||
if (map_block (name, namespace, objfile, block,
|
||||
if (map_block (name, domain, objfile, block,
|
||||
callback, data, match))
|
||||
return;
|
||||
if (callback (block, NULL, data))
|
||||
@ -1550,12 +1550,12 @@ psymbol_hash (const void *addr, int length)
|
||||
struct partial_symbol *psymbol = (struct partial_symbol *) addr;
|
||||
unsigned int lang = psymbol->ginfo.language;
|
||||
unsigned int domain = PSYMBOL_DOMAIN (psymbol);
|
||||
unsigned int class = PSYMBOL_CLASS (psymbol);
|
||||
unsigned int theclass = PSYMBOL_CLASS (psymbol);
|
||||
|
||||
h = hash_continue (&psymbol->ginfo.value, sizeof (psymbol->ginfo.value), h);
|
||||
h = hash_continue (&lang, sizeof (unsigned int), h);
|
||||
h = hash_continue (&domain, sizeof (unsigned int), h);
|
||||
h = hash_continue (&class, sizeof (unsigned int), h);
|
||||
h = hash_continue (&theclass, sizeof (unsigned int), h);
|
||||
h = hash_continue (psymbol->ginfo.name, strlen (psymbol->ginfo.name), h);
|
||||
|
||||
return h;
|
||||
@ -1633,7 +1633,7 @@ psymbol_bcache_full (struct partial_symbol *sym,
|
||||
static const struct partial_symbol *
|
||||
add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
|
||||
domain_enum domain,
|
||||
enum address_class class,
|
||||
enum address_class theclass,
|
||||
long val, /* Value as a long */
|
||||
CORE_ADDR coreaddr, /* Value as a CORE_ADDR */
|
||||
enum language language, struct objfile *objfile,
|
||||
@ -1658,7 +1658,7 @@ add_psymbol_to_bcache (const char *name, int namelength, int copy_name,
|
||||
SYMBOL_SECTION (&psymbol) = -1;
|
||||
SYMBOL_SET_LANGUAGE (&psymbol, language, &objfile->objfile_obstack);
|
||||
PSYMBOL_DOMAIN (&psymbol) = domain;
|
||||
PSYMBOL_CLASS (&psymbol) = class;
|
||||
PSYMBOL_CLASS (&psymbol) = theclass;
|
||||
|
||||
SYMBOL_SET_NAMES (&psymbol, name, namelength, copy_name, objfile);
|
||||
|
||||
@ -1718,7 +1718,7 @@ append_psymbol_to_list (struct psymbol_allocation_list *list,
|
||||
void
|
||||
add_psymbol_to_list (const char *name, int namelength, int copy_name,
|
||||
domain_enum domain,
|
||||
enum address_class class,
|
||||
enum address_class theclass,
|
||||
struct psymbol_allocation_list *list,
|
||||
long val, /* Value as a long */
|
||||
CORE_ADDR coreaddr, /* Value as a CORE_ADDR */
|
||||
@ -1729,7 +1729,7 @@ add_psymbol_to_list (const char *name, int namelength, int copy_name,
|
||||
int added;
|
||||
|
||||
/* Stash the partial symbol away in the cache. */
|
||||
psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, class,
|
||||
psym = add_psymbol_to_bcache (name, namelength, copy_name, domain, theclass,
|
||||
val, coreaddr, language, objfile, &added);
|
||||
|
||||
/* Do not duplicate global partial symbols. */
|
||||
|
@ -147,42 +147,42 @@ static PyObject *
|
||||
sympy_is_constant (PyObject *self, void *closure)
|
||||
{
|
||||
struct symbol *symbol = NULL;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
|
||||
SYMPY_REQUIRE_VALID (self, symbol);
|
||||
|
||||
class = SYMBOL_CLASS (symbol);
|
||||
theclass = SYMBOL_CLASS (symbol);
|
||||
|
||||
return PyBool_FromLong (class == LOC_CONST || class == LOC_CONST_BYTES);
|
||||
return PyBool_FromLong (theclass == LOC_CONST || theclass == LOC_CONST_BYTES);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
sympy_is_function (PyObject *self, void *closure)
|
||||
{
|
||||
struct symbol *symbol = NULL;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
|
||||
SYMPY_REQUIRE_VALID (self, symbol);
|
||||
|
||||
class = SYMBOL_CLASS (symbol);
|
||||
theclass = SYMBOL_CLASS (symbol);
|
||||
|
||||
return PyBool_FromLong (class == LOC_BLOCK);
|
||||
return PyBool_FromLong (theclass == LOC_BLOCK);
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
sympy_is_variable (PyObject *self, void *closure)
|
||||
{
|
||||
struct symbol *symbol = NULL;
|
||||
enum address_class class;
|
||||
enum address_class theclass;
|
||||
|
||||
SYMPY_REQUIRE_VALID (self, symbol);
|
||||
|
||||
class = SYMBOL_CLASS (symbol);
|
||||
theclass = SYMBOL_CLASS (symbol);
|
||||
|
||||
return PyBool_FromLong (!SYMBOL_IS_ARGUMENT (symbol)
|
||||
&& (class == LOC_LOCAL || class == LOC_REGISTER
|
||||
|| class == LOC_STATIC || class == LOC_COMPUTED
|
||||
|| class == LOC_OPTIMIZED_OUT));
|
||||
&& (theclass == LOC_LOCAL || theclass == LOC_REGISTER
|
||||
|| theclass == LOC_STATIC || theclass == LOC_COMPUTED
|
||||
|| theclass == LOC_OPTIMIZED_OUT));
|
||||
}
|
||||
|
||||
/* Implementation of gdb.Symbol.needs_frame -> Boolean.
|
||||
|
@ -846,7 +846,7 @@ mips_send_packet (const char *s, int get_ack)
|
||||
/* unsigned */ int len;
|
||||
unsigned char *packet;
|
||||
int cksum;
|
||||
int try;
|
||||
int attempt;
|
||||
|
||||
len = strlen (s);
|
||||
if (len > DATA_MAXLEN)
|
||||
@ -873,7 +873,7 @@ mips_send_packet (const char *s, int get_ack)
|
||||
/* We can only have one outstanding data packet, so we just wait for
|
||||
the acknowledgement here. Keep retransmitting the packet until
|
||||
we get one, or until we've tried too many times. */
|
||||
for (try = 0; try < mips_send_retries; try++)
|
||||
for (attempt = 0; attempt < mips_send_retries; attempt++)
|
||||
{
|
||||
int garbage;
|
||||
int ch;
|
||||
|
18
gdb/remote.c
18
gdb/remote.c
@ -1659,15 +1659,15 @@ demand_private_info (ptid_t ptid)
|
||||
|
||||
gdb_assert (info);
|
||||
|
||||
if (!info->private)
|
||||
if (!info->priv)
|
||||
{
|
||||
info->private = xmalloc (sizeof (*(info->private)));
|
||||
info->priv = xmalloc (sizeof (*(info->priv)));
|
||||
info->private_dtor = free_private_thread_info;
|
||||
info->private->core = -1;
|
||||
info->private->extra = 0;
|
||||
info->priv->core = -1;
|
||||
info->priv->extra = 0;
|
||||
}
|
||||
|
||||
return info->private;
|
||||
return info->priv;
|
||||
}
|
||||
|
||||
/* Call this function as a result of
|
||||
@ -2910,8 +2910,8 @@ remote_threads_extra_info (struct target_ops *self, struct thread_info *tp)
|
||||
{
|
||||
struct thread_info *info = find_thread_ptid (tp->ptid);
|
||||
|
||||
if (info && info->private)
|
||||
return info->private->extra;
|
||||
if (info && info->priv)
|
||||
return info->priv->extra;
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
@ -11156,8 +11156,8 @@ remote_core_of_thread (struct target_ops *ops, ptid_t ptid)
|
||||
{
|
||||
struct thread_info *info = find_thread_ptid (ptid);
|
||||
|
||||
if (info && info->private)
|
||||
return info->private->core;
|
||||
if (info && info->priv)
|
||||
return info->priv->core;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ darwin_current_sos (void)
|
||||
char *file_path;
|
||||
int errcode;
|
||||
struct darwin_so_list *dnew;
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
struct cleanup *old_chain;
|
||||
|
||||
/* Read image info from inferior. */
|
||||
@ -302,22 +302,22 @@ darwin_current_sos (void)
|
||||
|
||||
/* Create and fill the new so_list element. */
|
||||
dnew = XCNEW (struct darwin_so_list);
|
||||
new = &dnew->sl;
|
||||
newobj = &dnew->sl;
|
||||
old_chain = make_cleanup (xfree, dnew);
|
||||
|
||||
new->lm_info = &dnew->li;
|
||||
newobj->lm_info = &dnew->li;
|
||||
|
||||
strncpy (new->so_name, file_path, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strncpy (newobj->so_name, file_path, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
xfree (file_path);
|
||||
new->lm_info->lm_addr = load_addr;
|
||||
newobj->lm_info->lm_addr = load_addr;
|
||||
|
||||
if (head == NULL)
|
||||
head = new;
|
||||
head = newobj;
|
||||
else
|
||||
tail->next = new;
|
||||
tail = new;
|
||||
tail->next = newobj;
|
||||
tail = newobj;
|
||||
|
||||
discard_cleanups (old_chain);
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid)
|
||||
struct regcache *regcache = get_thread_regcache (ptid);
|
||||
CORE_ADDR pc = regcache_read_pc (regcache);
|
||||
struct address_space *aspace = get_regcache_aspace (regcache);
|
||||
ia64_insn t0, t1, slot[3], template, insn;
|
||||
ia64_insn t0, t1, slot[3], templ, insn;
|
||||
int slotnum;
|
||||
bfd_byte bundle[16];
|
||||
|
||||
@ -139,12 +139,12 @@ ia64_hpux_at_dld_breakpoint_1_p (ptid_t ptid)
|
||||
/* bundles are always in little-endian byte order */
|
||||
t0 = bfd_getl64 (bundle);
|
||||
t1 = bfd_getl64 (bundle + 8);
|
||||
template = (t0 >> 1) & 0xf;
|
||||
templ = (t0 >> 1) & 0xf;
|
||||
slot[0] = (t0 >> 5) & 0x1ffffffffffLL;
|
||||
slot[1] = ((t0 >> 46) & 0x3ffff) | ((t1 & 0x7fffff) << 18);
|
||||
slot[2] = (t1 >> 23) & 0x1ffffffffffLL;
|
||||
|
||||
if (template == 2 && slotnum == 1)
|
||||
if (templ == 2 && slotnum == 1)
|
||||
{
|
||||
/* skip L slot in MLI template: */
|
||||
slotnum = 2;
|
||||
|
@ -426,7 +426,7 @@ pa64_current_sos (void)
|
||||
{
|
||||
struct load_module_desc dll_desc;
|
||||
char *dll_path;
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
struct cleanup *old_chain;
|
||||
|
||||
if (dll_index == 0)
|
||||
@ -443,22 +443,22 @@ pa64_current_sos (void)
|
||||
pa64_target_read_memory,
|
||||
0, dld_cache.load_map);
|
||||
|
||||
new = (struct so_list *) xmalloc (sizeof (struct so_list));
|
||||
memset (new, 0, sizeof (struct so_list));
|
||||
new->lm_info = (struct lm_info *) xmalloc (sizeof (struct lm_info));
|
||||
memset (new->lm_info, 0, sizeof (struct lm_info));
|
||||
newobj = (struct so_list *) xmalloc (sizeof (struct so_list));
|
||||
memset (newobj, 0, sizeof (struct so_list));
|
||||
newobj->lm_info = (struct lm_info *) xmalloc (sizeof (struct lm_info));
|
||||
memset (newobj->lm_info, 0, sizeof (struct lm_info));
|
||||
|
||||
strncpy (new->so_name, dll_path, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strncpy (newobj->so_name, dll_path, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
|
||||
memcpy (&new->lm_info->desc, &dll_desc, sizeof (dll_desc));
|
||||
memcpy (&newobj->lm_info->desc, &dll_desc, sizeof (dll_desc));
|
||||
|
||||
#ifdef SOLIB_PA64_DBG
|
||||
{
|
||||
struct load_module_desc *d = &new->lm_info->desc;
|
||||
struct load_module_desc *d = &newobj->lm_info->desc;
|
||||
|
||||
printf ("\n+ library \"%s\" is described at index %d\n", new->so_name,
|
||||
printf ("\n+ library \"%s\" is described at index %d\n", newobj->so_name,
|
||||
dll_index);
|
||||
printf (" text_base = %s\n", hex_string (d->text_base));
|
||||
printf (" text_size = %s\n", hex_string (d->text_size));
|
||||
@ -475,9 +475,9 @@ pa64_current_sos (void)
|
||||
#endif
|
||||
|
||||
/* Link the new object onto the list. */
|
||||
new->next = NULL;
|
||||
*link_ptr = new;
|
||||
link_ptr = &new->next;
|
||||
newobj->next = NULL;
|
||||
*link_ptr = newobj;
|
||||
link_ptr = &newobj->next;
|
||||
}
|
||||
|
||||
return head;
|
||||
|
@ -585,18 +585,18 @@ som_current_sos (void)
|
||||
{
|
||||
char *namebuf;
|
||||
CORE_ADDR addr;
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
struct cleanup *old_chain;
|
||||
int errcode;
|
||||
struct dld_list dbuf;
|
||||
gdb_byte tsdbuf[4];
|
||||
|
||||
new = (struct so_list *) xmalloc (sizeof (struct so_list));
|
||||
old_chain = make_cleanup (xfree, new);
|
||||
newobj = (struct so_list *) xmalloc (sizeof (struct so_list));
|
||||
old_chain = make_cleanup (xfree, newobj);
|
||||
|
||||
memset (new, 0, sizeof (*new));
|
||||
new->lm_info = xmalloc (sizeof (struct lm_info));
|
||||
make_cleanup (xfree, new->lm_info);
|
||||
memset (newobj, 0, sizeof (*newobj));
|
||||
newobj->lm_info = xmalloc (sizeof (struct lm_info));
|
||||
make_cleanup (xfree, newobj->lm_info);
|
||||
|
||||
read_memory (lm, (gdb_byte *)&dbuf, sizeof (struct dld_list));
|
||||
|
||||
@ -608,15 +608,15 @@ som_current_sos (void)
|
||||
safe_strerror (errcode));
|
||||
else
|
||||
{
|
||||
strncpy (new->so_name, namebuf, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strncpy (newobj->so_name, namebuf, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
xfree (namebuf);
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
}
|
||||
|
||||
if (new->so_name[0] && !match_main (new->so_name))
|
||||
if (newobj->so_name[0] && !match_main (newobj->so_name))
|
||||
{
|
||||
struct lm_info *lmi = new->lm_info;
|
||||
struct lm_info *lmi = newobj->lm_info;
|
||||
unsigned int tmp;
|
||||
|
||||
lmi->lm_addr = lm;
|
||||
@ -642,41 +642,41 @@ som_current_sos (void)
|
||||
= extract_unsigned_integer (tsdbuf, 4, byte_order);
|
||||
|
||||
#ifdef SOLIB_SOM_DBG
|
||||
printf ("\n+ library \"%s\" is described at %s\n", new->so_name,
|
||||
printf ("\n+ library \"%s\" is described at %s\n", newobj->so_name,
|
||||
paddress (target_gdbarch (), lm));
|
||||
printf (" 'version' is %d\n", new->lm_info->struct_version);
|
||||
printf (" 'bind_mode' is %d\n", new->lm_info->bind_mode);
|
||||
printf (" 'version' is %d\n", newobj->lm_info->struct_version);
|
||||
printf (" 'bind_mode' is %d\n", newobj->lm_info->bind_mode);
|
||||
printf (" 'library_version' is %d\n",
|
||||
new->lm_info->library_version);
|
||||
newobj->lm_info->library_version);
|
||||
printf (" 'text_addr' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->text_addr));
|
||||
paddress (target_gdbarch (), newobj->lm_info->text_addr));
|
||||
printf (" 'text_link_addr' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->text_link_addr));
|
||||
paddress (target_gdbarch (), newobj->lm_info->text_link_addr));
|
||||
printf (" 'text_end' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->text_end));
|
||||
paddress (target_gdbarch (), newobj->lm_info->text_end));
|
||||
printf (" 'data_start' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->data_start));
|
||||
paddress (target_gdbarch (), newobj->lm_info->data_start));
|
||||
printf (" 'bss_start' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->bss_start));
|
||||
paddress (target_gdbarch (), newobj->lm_info->bss_start));
|
||||
printf (" 'data_end' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->data_end));
|
||||
paddress (target_gdbarch (), newobj->lm_info->data_end));
|
||||
printf (" 'got_value' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->got_value));
|
||||
paddress (target_gdbarch (), newobj->lm_info->got_value));
|
||||
printf (" 'tsd_start_addr' is %s\n",
|
||||
paddress (target_gdbarch (), new->lm_info->tsd_start_addr));
|
||||
paddress (target_gdbarch (), newobj->lm_info->tsd_start_addr));
|
||||
#endif
|
||||
|
||||
new->addr_low = lmi->text_addr;
|
||||
new->addr_high = lmi->text_end;
|
||||
newobj->addr_low = lmi->text_addr;
|
||||
newobj->addr_high = lmi->text_end;
|
||||
|
||||
/* Link the new object onto the list. */
|
||||
new->next = NULL;
|
||||
*link_ptr = new;
|
||||
link_ptr = &new->next;
|
||||
newobj->next = NULL;
|
||||
*link_ptr = newobj;
|
||||
link_ptr = &newobj->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
free_so (new);
|
||||
free_so (newobj);
|
||||
}
|
||||
|
||||
lm = EXTRACT (next);
|
||||
|
@ -119,19 +119,19 @@ append_ocl_sos (struct so_list **link_ptr)
|
||||
byte_order);
|
||||
if (data != 0x0)
|
||||
{
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
|
||||
/* Allocate so_list structure. */
|
||||
new = XCNEW (struct so_list);
|
||||
newobj = XCNEW (struct so_list);
|
||||
|
||||
/* Encode FD and object ID in path name. */
|
||||
xsnprintf (new->so_name, sizeof new->so_name, "@%s <%d>",
|
||||
xsnprintf (newobj->so_name, sizeof newobj->so_name, "@%s <%d>",
|
||||
hex_string (data),
|
||||
SPUADDR_SPU (*ocl_program_addr_base));
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
|
||||
*link_ptr = new;
|
||||
link_ptr = &new->next;
|
||||
*link_ptr = newobj;
|
||||
link_ptr = &newobj->next;
|
||||
}
|
||||
}
|
||||
if (ex.reason < 0)
|
||||
@ -195,7 +195,7 @@ spu_current_sos (void)
|
||||
for (i = 0; i < size; i += 4)
|
||||
{
|
||||
int fd = extract_unsigned_integer (buf + i, 4, byte_order);
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
|
||||
unsigned long long addr;
|
||||
char annex[32], id[100];
|
||||
@ -214,16 +214,16 @@ spu_current_sos (void)
|
||||
continue;
|
||||
|
||||
/* Allocate so_list structure. */
|
||||
new = XCNEW (struct so_list);
|
||||
newobj = XCNEW (struct so_list);
|
||||
|
||||
/* Encode FD and object ID in path name. Choose the name so as not
|
||||
to conflict with any (normal) SVR4 library path name. */
|
||||
xsnprintf (new->so_name, sizeof new->so_name, "@%s <%d>",
|
||||
xsnprintf (newobj->so_name, sizeof newobj->so_name, "@%s <%d>",
|
||||
hex_string (addr), fd);
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
|
||||
*link_ptr = new;
|
||||
link_ptr = &new->next;
|
||||
*link_ptr = newobj;
|
||||
link_ptr = &newobj->next;
|
||||
}
|
||||
|
||||
/* Append OpenCL sos. */
|
||||
|
@ -932,7 +932,7 @@ svr4_keep_data_in_core (CORE_ADDR vaddr, unsigned long size)
|
||||
{
|
||||
struct svr4_info *info;
|
||||
CORE_ADDR ldsomap;
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
struct cleanup *old_chain;
|
||||
CORE_ADDR name_lm;
|
||||
|
||||
@ -947,11 +947,11 @@ svr4_keep_data_in_core (CORE_ADDR vaddr, unsigned long size)
|
||||
if (!ldsomap)
|
||||
return 0;
|
||||
|
||||
new = XCNEW (struct so_list);
|
||||
old_chain = make_cleanup (xfree, new);
|
||||
new->lm_info = lm_info_read (ldsomap);
|
||||
make_cleanup (xfree, new->lm_info);
|
||||
name_lm = new->lm_info ? new->lm_info->l_name : 0;
|
||||
newobj = XCNEW (struct so_list);
|
||||
old_chain = make_cleanup (xfree, newobj);
|
||||
newobj->lm_info = lm_info_read (ldsomap);
|
||||
make_cleanup (xfree, newobj->lm_info);
|
||||
name_lm = newobj->lm_info ? newobj->lm_info->l_name : 0;
|
||||
do_cleanups (old_chain);
|
||||
|
||||
return (name_lm >= vaddr && name_lm < vaddr + size);
|
||||
@ -1087,17 +1087,17 @@ svr4_copy_library_list (struct so_list *src)
|
||||
|
||||
while (src != NULL)
|
||||
{
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
|
||||
new = xmalloc (sizeof (struct so_list));
|
||||
memcpy (new, src, sizeof (struct so_list));
|
||||
newobj = xmalloc (sizeof (struct so_list));
|
||||
memcpy (newobj, src, sizeof (struct so_list));
|
||||
|
||||
new->lm_info = xmalloc (sizeof (struct lm_info));
|
||||
memcpy (new->lm_info, src->lm_info, sizeof (struct lm_info));
|
||||
newobj->lm_info = xmalloc (sizeof (struct lm_info));
|
||||
memcpy (newobj->lm_info, src->lm_info, sizeof (struct lm_info));
|
||||
|
||||
new->next = NULL;
|
||||
*link = new;
|
||||
link = &new->next;
|
||||
newobj->next = NULL;
|
||||
*link = newobj;
|
||||
link = &newobj->next;
|
||||
|
||||
src = src->next;
|
||||
}
|
||||
@ -1272,24 +1272,24 @@ static struct so_list *
|
||||
svr4_default_sos (void)
|
||||
{
|
||||
struct svr4_info *info = get_svr4_info ();
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
|
||||
if (!info->debug_loader_offset_p)
|
||||
return NULL;
|
||||
|
||||
new = XCNEW (struct so_list);
|
||||
newobj = XCNEW (struct so_list);
|
||||
|
||||
new->lm_info = xzalloc (sizeof (struct lm_info));
|
||||
newobj->lm_info = xzalloc (sizeof (struct lm_info));
|
||||
|
||||
/* Nothing will ever check the other fields if we set l_addr_p. */
|
||||
new->lm_info->l_addr = info->debug_loader_offset;
|
||||
new->lm_info->l_addr_p = 1;
|
||||
newobj->lm_info->l_addr = info->debug_loader_offset;
|
||||
newobj->lm_info->l_addr_p = 1;
|
||||
|
||||
strncpy (new->so_name, info->debug_loader_name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strncpy (newobj->so_name, info->debug_loader_name, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
|
||||
return new;
|
||||
return newobj;
|
||||
}
|
||||
|
||||
/* Read the whole inferior libraries chain starting at address LM.
|
||||
@ -1309,28 +1309,28 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
|
||||
for (; lm != 0; prev_lm = lm, lm = next_lm)
|
||||
{
|
||||
struct so_list *new;
|
||||
struct so_list *newobj;
|
||||
struct cleanup *old_chain;
|
||||
int errcode;
|
||||
char *buffer;
|
||||
|
||||
new = XCNEW (struct so_list);
|
||||
old_chain = make_cleanup_free_so (new);
|
||||
newobj = XCNEW (struct so_list);
|
||||
old_chain = make_cleanup_free_so (newobj);
|
||||
|
||||
new->lm_info = lm_info_read (lm);
|
||||
if (new->lm_info == NULL)
|
||||
newobj->lm_info = lm_info_read (lm);
|
||||
if (newobj->lm_info == NULL)
|
||||
{
|
||||
do_cleanups (old_chain);
|
||||
return 0;
|
||||
}
|
||||
|
||||
next_lm = new->lm_info->l_next;
|
||||
next_lm = newobj->lm_info->l_next;
|
||||
|
||||
if (new->lm_info->l_prev != prev_lm)
|
||||
if (newobj->lm_info->l_prev != prev_lm)
|
||||
{
|
||||
warning (_("Corrupted shared library list: %s != %s"),
|
||||
paddress (target_gdbarch (), prev_lm),
|
||||
paddress (target_gdbarch (), new->lm_info->l_prev));
|
||||
paddress (target_gdbarch (), newobj->lm_info->l_prev));
|
||||
do_cleanups (old_chain);
|
||||
return 0;
|
||||
}
|
||||
@ -1340,18 +1340,18 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
SVR4, it has no name. For others (Solaris 2.3 for example), it
|
||||
does have a name, so we can no longer use a missing name to
|
||||
decide when to ignore it. */
|
||||
if (ignore_first && new->lm_info->l_prev == 0)
|
||||
if (ignore_first && newobj->lm_info->l_prev == 0)
|
||||
{
|
||||
struct svr4_info *info = get_svr4_info ();
|
||||
|
||||
first_l_name = new->lm_info->l_name;
|
||||
info->main_lm_addr = new->lm_info->lm_addr;
|
||||
first_l_name = newobj->lm_info->l_name;
|
||||
info->main_lm_addr = newobj->lm_info->lm_addr;
|
||||
do_cleanups (old_chain);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Extract this shared object's name. */
|
||||
target_read_string (new->lm_info->l_name, &buffer,
|
||||
target_read_string (newobj->lm_info->l_name, &buffer,
|
||||
SO_NAME_MAX_PATH_SIZE - 1, &errcode);
|
||||
if (errcode != 0)
|
||||
{
|
||||
@ -1359,30 +1359,30 @@ svr4_read_so_list (CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
inferior executable, then this is not a normal shared
|
||||
object, but (most likely) a vDSO. In this case, silently
|
||||
skip it; otherwise emit a warning. */
|
||||
if (first_l_name == 0 || new->lm_info->l_name != first_l_name)
|
||||
if (first_l_name == 0 || newobj->lm_info->l_name != first_l_name)
|
||||
warning (_("Can't read pathname for load map: %s."),
|
||||
safe_strerror (errcode));
|
||||
do_cleanups (old_chain);
|
||||
continue;
|
||||
}
|
||||
|
||||
strncpy (new->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
new->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (new->so_original_name, new->so_name);
|
||||
strncpy (newobj->so_name, buffer, SO_NAME_MAX_PATH_SIZE - 1);
|
||||
newobj->so_name[SO_NAME_MAX_PATH_SIZE - 1] = '\0';
|
||||
strcpy (newobj->so_original_name, newobj->so_name);
|
||||
xfree (buffer);
|
||||
|
||||
/* If this entry has no name, or its name matches the name
|
||||
for the main executable, don't include it in the list. */
|
||||
if (! new->so_name[0] || match_main (new->so_name))
|
||||
if (! newobj->so_name[0] || match_main (newobj->so_name))
|
||||
{
|
||||
do_cleanups (old_chain);
|
||||
continue;
|
||||
}
|
||||
|
||||
discard_cleanups (old_chain);
|
||||
new->next = 0;
|
||||
**link_ptr_ptr = new;
|
||||
*link_ptr_ptr = &new->next;
|
||||
newobj->next = 0;
|
||||
**link_ptr_ptr = newobj;
|
||||
*link_ptr_ptr = &newobj->next;
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -1807,10 +1807,10 @@ again:
|
||||
while (**pp && **pp != '#')
|
||||
{
|
||||
struct type *arg_type = read_type (pp, objfile);
|
||||
struct type_list *new = alloca (sizeof (*new));
|
||||
new->type = arg_type;
|
||||
new->next = arg_types;
|
||||
arg_types = new;
|
||||
struct type_list *newobj = alloca (sizeof (*newobj));
|
||||
newobj->type = arg_type;
|
||||
newobj->next = arg_types;
|
||||
arg_types = newobj;
|
||||
num_args++;
|
||||
}
|
||||
if (**pp == '#')
|
||||
@ -2999,7 +2999,7 @@ read_struct_fields (struct field_info *fip, char **pp, struct type *type,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
char *p;
|
||||
struct nextfield *new;
|
||||
struct nextfield *newobj;
|
||||
|
||||
/* We better set p right now, in case there are no fields at all... */
|
||||
|
||||
@ -3015,11 +3015,11 @@ read_struct_fields (struct field_info *fip, char **pp, struct type *type,
|
||||
{
|
||||
STABS_CONTINUE (pp, objfile);
|
||||
/* Get space to record the next field's data. */
|
||||
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
|
||||
make_cleanup (xfree, new);
|
||||
memset (new, 0, sizeof (struct nextfield));
|
||||
new->next = fip->list;
|
||||
fip->list = new;
|
||||
newobj = (struct nextfield *) xmalloc (sizeof (struct nextfield));
|
||||
make_cleanup (xfree, newobj);
|
||||
memset (newobj, 0, sizeof (struct nextfield));
|
||||
newobj->next = fip->list;
|
||||
fip->list = newobj;
|
||||
|
||||
/* Get the field name. */
|
||||
p = *pp;
|
||||
@ -3097,7 +3097,7 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
|
||||
struct objfile *objfile)
|
||||
{
|
||||
int i;
|
||||
struct nextfield *new;
|
||||
struct nextfield *newobj;
|
||||
|
||||
if (**pp != '!')
|
||||
{
|
||||
@ -3137,12 +3137,12 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
|
||||
|
||||
for (i = 0; i < TYPE_N_BASECLASSES (type); i++)
|
||||
{
|
||||
new = (struct nextfield *) xmalloc (sizeof (struct nextfield));
|
||||
make_cleanup (xfree, new);
|
||||
memset (new, 0, sizeof (struct nextfield));
|
||||
new->next = fip->list;
|
||||
fip->list = new;
|
||||
FIELD_BITSIZE (new->field) = 0; /* This should be an unpacked
|
||||
newobj = (struct nextfield *) xmalloc (sizeof (struct nextfield));
|
||||
make_cleanup (xfree, newobj);
|
||||
memset (newobj, 0, sizeof (struct nextfield));
|
||||
newobj->next = fip->list;
|
||||
fip->list = newobj;
|
||||
FIELD_BITSIZE (newobj->field) = 0; /* This should be an unpacked
|
||||
field! */
|
||||
|
||||
STABS_CONTINUE (pp, objfile);
|
||||
@ -3164,8 +3164,8 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
|
||||
}
|
||||
++(*pp);
|
||||
|
||||
new->visibility = *(*pp)++;
|
||||
switch (new->visibility)
|
||||
newobj->visibility = *(*pp)++;
|
||||
switch (newobj->visibility)
|
||||
{
|
||||
case VISIBILITY_PRIVATE:
|
||||
case VISIBILITY_PROTECTED:
|
||||
@ -3177,8 +3177,8 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
|
||||
{
|
||||
complaint (&symfile_complaints,
|
||||
_("Unknown visibility `%c' for baseclass"),
|
||||
new->visibility);
|
||||
new->visibility = VISIBILITY_PUBLIC;
|
||||
newobj->visibility);
|
||||
newobj->visibility = VISIBILITY_PUBLIC;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3189,7 +3189,7 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
|
||||
corresponding to this baseclass. Always zero in the absence of
|
||||
multiple inheritance. */
|
||||
|
||||
SET_FIELD_BITPOS (new->field, read_huge_number (pp, ',', &nbits, 0));
|
||||
SET_FIELD_BITPOS (newobj->field, read_huge_number (pp, ',', &nbits, 0));
|
||||
if (nbits != 0)
|
||||
return 0;
|
||||
}
|
||||
@ -3198,8 +3198,8 @@ read_baseclasses (struct field_info *fip, char **pp, struct type *type,
|
||||
base class. Read it, and remember it's type name as this
|
||||
field's name. */
|
||||
|
||||
new->field.type = read_type (pp, objfile);
|
||||
new->field.name = type_name_no_tag (new->field.type);
|
||||
newobj->field.type = read_type (pp, objfile);
|
||||
newobj->field.name = type_name_no_tag (newobj->field.type);
|
||||
|
||||
/* Skip trailing ';' and bump count of number of fields seen. */
|
||||
if (**pp == ';')
|
||||
@ -4350,7 +4350,7 @@ common_block_end (struct objfile *objfile)
|
||||
symbol for the common block name for later fixup. */
|
||||
int i;
|
||||
struct symbol *sym;
|
||||
struct pending *new = 0;
|
||||
struct pending *newobj = 0;
|
||||
struct pending *next;
|
||||
int j;
|
||||
|
||||
@ -4373,7 +4373,7 @@ common_block_end (struct objfile *objfile)
|
||||
next = next->next)
|
||||
{
|
||||
for (j = 0; j < next->nsyms; j++)
|
||||
add_symbol_to_list (next->symbol[j], &new);
|
||||
add_symbol_to_list (next->symbol[j], &newobj);
|
||||
}
|
||||
|
||||
/* Copy however much of COMMON_BLOCK we need. If COMMON_BLOCK is
|
||||
@ -4382,9 +4382,9 @@ common_block_end (struct objfile *objfile)
|
||||
|
||||
if (common_block != NULL)
|
||||
for (j = common_block_i; j < common_block->nsyms; j++)
|
||||
add_symbol_to_list (common_block->symbol[j], &new);
|
||||
add_symbol_to_list (common_block->symbol[j], &newobj);
|
||||
|
||||
SYMBOL_TYPE (sym) = (struct type *) new;
|
||||
SYMBOL_TYPE (sym) = (struct type *) newobj;
|
||||
|
||||
/* Should we be putting local_symbols back to what it was?
|
||||
Does it matter? */
|
||||
@ -4554,9 +4554,9 @@ cleanup_undefined_types_1 (void)
|
||||
struct pending *ppt;
|
||||
int i;
|
||||
/* Name of the type, without "struct" or "union". */
|
||||
const char *typename = TYPE_TAG_NAME (*type);
|
||||
const char *type_name = TYPE_TAG_NAME (*type);
|
||||
|
||||
if (typename == NULL)
|
||||
if (type_name == NULL)
|
||||
{
|
||||
complaint (&symfile_complaints, _("need a type name"));
|
||||
break;
|
||||
@ -4574,7 +4574,7 @@ cleanup_undefined_types_1 (void)
|
||||
&& (TYPE_INSTANCE_FLAGS (*type) ==
|
||||
TYPE_INSTANCE_FLAGS (SYMBOL_TYPE (sym)))
|
||||
&& strcmp (SYMBOL_LINKAGE_NAME (sym),
|
||||
typename) == 0)
|
||||
type_name) == 0)
|
||||
replace_type (*type, SYMBOL_TYPE (sym));
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ debug_qf_expand_symtabs_with_fullname (struct objfile *objfile,
|
||||
|
||||
static void
|
||||
debug_qf_map_matching_symbols (struct objfile *objfile,
|
||||
const char *name, domain_enum namespace,
|
||||
const char *name, domain_enum domain,
|
||||
int global,
|
||||
int (*callback) (struct block *,
|
||||
struct symbol *, void *),
|
||||
@ -263,14 +263,14 @@ debug_qf_map_matching_symbols (struct objfile *objfile,
|
||||
fprintf_filtered (gdb_stdlog,
|
||||
"qf->map_matching_symbols (%s, \"%s\", %s, %d, %s, %s, %s, %s)\n",
|
||||
objfile_debug_name (objfile), name,
|
||||
domain_name (namespace), global,
|
||||
domain_name (domain), global,
|
||||
host_address_to_string (callback),
|
||||
host_address_to_string (data),
|
||||
host_address_to_string (match),
|
||||
host_address_to_string (ordered_compare));
|
||||
|
||||
debug_data->real_sf->qf->map_matching_symbols (objfile, name,
|
||||
namespace, global,
|
||||
domain, global,
|
||||
callback, data,
|
||||
match,
|
||||
ordered_compare);
|
||||
|
@ -238,7 +238,7 @@ struct quick_symbol_functions
|
||||
void (*expand_symtabs_with_fullname) (struct objfile *objfile,
|
||||
const char *fullname);
|
||||
|
||||
/* Find global or static symbols in all tables that are in NAMESPACE
|
||||
/* Find global or static symbols in all tables that are in DOMAIN
|
||||
and for which MATCH (symbol name, NAME) == 0, passing each to
|
||||
CALLBACK, reading in partial symbol tables as needed. Look
|
||||
through global symbols if GLOBAL and otherwise static symbols.
|
||||
@ -256,7 +256,7 @@ struct quick_symbol_functions
|
||||
non-zero to indicate that the scan should be terminated. */
|
||||
|
||||
void (*map_matching_symbols) (struct objfile *,
|
||||
const char *name, domain_enum namespace,
|
||||
const char *name, domain_enum domain,
|
||||
int global,
|
||||
int (*callback) (struct block *,
|
||||
struct symbol *, void *),
|
||||
|
48
gdb/symtab.c
48
gdb/symtab.c
@ -5028,44 +5028,44 @@ completion_list_add_name (const char *symname,
|
||||
of matches. Note that the name is moved to freshly malloc'd space. */
|
||||
|
||||
{
|
||||
char *new;
|
||||
char *newobj;
|
||||
enum maybe_add_completion_enum add_status;
|
||||
|
||||
if (word == sym_text)
|
||||
{
|
||||
new = xmalloc (strlen (symname) + 5);
|
||||
strcpy (new, symname);
|
||||
newobj = xmalloc (strlen (symname) + 5);
|
||||
strcpy (newobj, symname);
|
||||
}
|
||||
else if (word > sym_text)
|
||||
{
|
||||
/* Return some portion of symname. */
|
||||
new = xmalloc (strlen (symname) + 5);
|
||||
strcpy (new, symname + (word - sym_text));
|
||||
newobj = xmalloc (strlen (symname) + 5);
|
||||
strcpy (newobj, symname + (word - sym_text));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Return some of SYM_TEXT plus symname. */
|
||||
new = xmalloc (strlen (symname) + (sym_text - word) + 5);
|
||||
strncpy (new, word, sym_text - word);
|
||||
new[sym_text - word] = '\0';
|
||||
strcat (new, symname);
|
||||
newobj = xmalloc (strlen (symname) + (sym_text - word) + 5);
|
||||
strncpy (newobj, word, sym_text - word);
|
||||
newobj[sym_text - word] = '\0';
|
||||
strcat (newobj, symname);
|
||||
}
|
||||
|
||||
add_status = maybe_add_completion (completion_tracker, new);
|
||||
add_status = maybe_add_completion (completion_tracker, newobj);
|
||||
|
||||
switch (add_status)
|
||||
{
|
||||
case MAYBE_ADD_COMPLETION_OK:
|
||||
VEC_safe_push (char_ptr, return_val, new);
|
||||
VEC_safe_push (char_ptr, return_val, newobj);
|
||||
break;
|
||||
case MAYBE_ADD_COMPLETION_OK_MAX_REACHED:
|
||||
VEC_safe_push (char_ptr, return_val, new);
|
||||
VEC_safe_push (char_ptr, return_val, newobj);
|
||||
throw_max_completions_reached_error ();
|
||||
case MAYBE_ADD_COMPLETION_MAX_REACHED:
|
||||
xfree (new);
|
||||
xfree (newobj);
|
||||
throw_max_completions_reached_error ();
|
||||
case MAYBE_ADD_COMPLETION_DUPLICATE:
|
||||
xfree (new);
|
||||
xfree (newobj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -5665,30 +5665,30 @@ static void
|
||||
add_filename_to_list (const char *fname, const char *text, const char *word,
|
||||
VEC (char_ptr) **list)
|
||||
{
|
||||
char *new;
|
||||
char *newobj;
|
||||
size_t fnlen = strlen (fname);
|
||||
|
||||
if (word == text)
|
||||
{
|
||||
/* Return exactly fname. */
|
||||
new = xmalloc (fnlen + 5);
|
||||
strcpy (new, fname);
|
||||
newobj = xmalloc (fnlen + 5);
|
||||
strcpy (newobj, fname);
|
||||
}
|
||||
else if (word > text)
|
||||
{
|
||||
/* Return some portion of fname. */
|
||||
new = xmalloc (fnlen + 5);
|
||||
strcpy (new, fname + (word - text));
|
||||
newobj = xmalloc (fnlen + 5);
|
||||
strcpy (newobj, fname + (word - text));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Return some of TEXT plus fname. */
|
||||
new = xmalloc (fnlen + (text - word) + 5);
|
||||
strncpy (new, word, text - word);
|
||||
new[text - word] = '\0';
|
||||
strcat (new, fname);
|
||||
newobj = xmalloc (fnlen + (text - word) + 5);
|
||||
strncpy (newobj, word, text - word);
|
||||
newobj[text - word] = '\0';
|
||||
strcat (newobj, fname);
|
||||
}
|
||||
VEC_safe_push (char_ptr, *list, new);
|
||||
VEC_safe_push (char_ptr, *list, newobj);
|
||||
}
|
||||
|
||||
static int
|
||||
|
10
gdb/thread.c
10
gdb/thread.c
@ -182,12 +182,12 @@ clear_thread_inferior_resources (struct thread_info *tp)
|
||||
static void
|
||||
free_thread (struct thread_info *tp)
|
||||
{
|
||||
if (tp->private)
|
||||
if (tp->priv)
|
||||
{
|
||||
if (tp->private_dtor)
|
||||
tp->private_dtor (tp->private);
|
||||
tp->private_dtor (tp->priv);
|
||||
else
|
||||
xfree (tp->private);
|
||||
xfree (tp->priv);
|
||||
}
|
||||
|
||||
xfree (tp->name);
|
||||
@ -288,11 +288,11 @@ add_thread_silent (ptid_t ptid)
|
||||
}
|
||||
|
||||
struct thread_info *
|
||||
add_thread_with_info (ptid_t ptid, struct private_thread_info *private)
|
||||
add_thread_with_info (ptid_t ptid, struct private_thread_info *priv)
|
||||
{
|
||||
struct thread_info *result = add_thread_silent (ptid);
|
||||
|
||||
result->private = private;
|
||||
result->priv = priv;
|
||||
|
||||
if (print_thread_events)
|
||||
printf_unfiltered (_("[New %s]\n"), target_pid_to_str (ptid));
|
||||
|
@ -462,7 +462,7 @@ execute_command (char *p, int from_tty)
|
||||
deprecated_cmd_warning (line);
|
||||
|
||||
/* c->user_commands would be NULL in the case of a python command. */
|
||||
if (c->class == class_user && c->user_commands)
|
||||
if (c->theclass == class_user && c->user_commands)
|
||||
execute_user_command (c, arg);
|
||||
else if (c->type == set_cmd)
|
||||
do_set_command (arg, from_tty, c);
|
||||
|
@ -253,7 +253,7 @@ tui_check_data_values (struct frame_info *frame)
|
||||
has changed (data_element_ptr, frame, &new_value)
|
||||
{
|
||||
data_element_ptr->value = new_value;
|
||||
update the display with the new value, hiliting it.
|
||||
update the display with the newobj value, hiliting it.
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -335,9 +335,9 @@ find_typedef_in_hash (const struct type_print_options *flags, struct type *t)
|
||||
NEW is the new name for a type TYPE. */
|
||||
|
||||
void
|
||||
typedef_print (struct type *type, struct symbol *new, struct ui_file *stream)
|
||||
typedef_print (struct type *type, struct symbol *newobj, struct ui_file *stream)
|
||||
{
|
||||
LA_PRINT_TYPEDEF (type, new, stream);
|
||||
LA_PRINT_TYPEDEF (type, newobj, stream);
|
||||
}
|
||||
|
||||
/* The default way to print a typedef. */
|
||||
@ -499,9 +499,9 @@ whatis_command (char *exp, int from_tty)
|
||||
/* TYPENAME is either the name of a type, or an expression. */
|
||||
|
||||
static void
|
||||
ptype_command (char *typename, int from_tty)
|
||||
ptype_command (char *type_name, int from_tty)
|
||||
{
|
||||
whatis_exp (typename, 1);
|
||||
whatis_exp (type_name, 1);
|
||||
}
|
||||
|
||||
/* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
|
||||
@ -592,16 +592,16 @@ print_type_scalar (struct type *type, LONGEST val, struct ui_file *stream)
|
||||
and whatis_command(). */
|
||||
|
||||
void
|
||||
maintenance_print_type (char *typename, int from_tty)
|
||||
maintenance_print_type (char *type_name, int from_tty)
|
||||
{
|
||||
struct value *val;
|
||||
struct type *type;
|
||||
struct cleanup *old_chain;
|
||||
struct expression *expr;
|
||||
|
||||
if (typename != NULL)
|
||||
if (type_name != NULL)
|
||||
{
|
||||
expr = parse_expression (typename);
|
||||
expr = parse_expression (type_name);
|
||||
old_chain = make_cleanup (free_current_contents, &expr);
|
||||
if (expr->elts[0].opcode == OP_TYPE)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ extern void set_ui_file_put (struct ui_file *stream, ui_file_put_ftype *put);
|
||||
|
||||
typedef void (ui_file_delete_ftype) (struct ui_file * stream);
|
||||
extern void set_ui_file_data (struct ui_file *stream, void *data,
|
||||
ui_file_delete_ftype *delete);
|
||||
ui_file_delete_ftype *to_delete);
|
||||
|
||||
typedef int (ui_file_fseek_ftype) (struct ui_file *stream, long offset,
|
||||
int whence);
|
||||
|
@ -284,14 +284,14 @@ unop_user_defined_p (enum exp_opcode op, struct value *arg1)
|
||||
situations or combinations thereof. */
|
||||
|
||||
static struct value *
|
||||
value_user_defined_cpp_op (struct value **args, int nargs, char *operator,
|
||||
value_user_defined_cpp_op (struct value **args, int nargs, char *oper,
|
||||
int *static_memfuncp, enum noside noside)
|
||||
{
|
||||
|
||||
struct symbol *symp = NULL;
|
||||
struct value *valp = NULL;
|
||||
|
||||
find_overload_match (args, nargs, operator, BOTH /* could be method */,
|
||||
find_overload_match (args, nargs, oper, BOTH /* could be method */,
|
||||
&args[0] /* objp */,
|
||||
NULL /* pass NULL symbol since symbol is unknown */,
|
||||
&valp, &symp, static_memfuncp, 0, noside);
|
||||
@ -308,7 +308,7 @@ value_user_defined_cpp_op (struct value **args, int nargs, char *operator,
|
||||
return value_of_variable (symp, 0);
|
||||
}
|
||||
|
||||
error (_("Could not find %s."), operator);
|
||||
error (_("Could not find %s."), oper);
|
||||
}
|
||||
|
||||
/* Lookup user defined operator NAME. Return a value representing the
|
||||
|
@ -1790,13 +1790,13 @@ record_latest_value (struct value *val)
|
||||
i = value_history_count % VALUE_HISTORY_CHUNK;
|
||||
if (i == 0)
|
||||
{
|
||||
struct value_history_chunk *new
|
||||
struct value_history_chunk *newobj
|
||||
= (struct value_history_chunk *)
|
||||
|
||||
xmalloc (sizeof (struct value_history_chunk));
|
||||
memset (new->values, 0, sizeof new->values);
|
||||
new->next = value_history_chain;
|
||||
value_history_chain = new;
|
||||
memset (newobj->values, 0, sizeof newobj->values);
|
||||
newobj->next = value_history_chain;
|
||||
value_history_chain = newobj;
|
||||
}
|
||||
|
||||
value_history_chain->values[i] = val;
|
||||
|
44
gdb/varobj.c
44
gdb/varobj.c
@ -702,7 +702,7 @@ static void
|
||||
install_dynamic_child (struct varobj *var,
|
||||
VEC (varobj_p) **changed,
|
||||
VEC (varobj_p) **type_changed,
|
||||
VEC (varobj_p) **new,
|
||||
VEC (varobj_p) **newobj,
|
||||
VEC (varobj_p) **unchanged,
|
||||
int *cchanged,
|
||||
int index,
|
||||
@ -713,9 +713,9 @@ install_dynamic_child (struct varobj *var,
|
||||
/* There's no child yet. */
|
||||
struct varobj *child = varobj_add_child (var, item);
|
||||
|
||||
if (new)
|
||||
if (newobj)
|
||||
{
|
||||
VEC_safe_push (varobj_p, *new, child);
|
||||
VEC_safe_push (varobj_p, *newobj, child);
|
||||
*cchanged = 1;
|
||||
}
|
||||
}
|
||||
@ -790,7 +790,7 @@ static int
|
||||
update_dynamic_varobj_children (struct varobj *var,
|
||||
VEC (varobj_p) **changed,
|
||||
VEC (varobj_p) **type_changed,
|
||||
VEC (varobj_p) **new,
|
||||
VEC (varobj_p) **newobj,
|
||||
VEC (varobj_p) **unchanged,
|
||||
int *cchanged,
|
||||
int update_children,
|
||||
@ -851,7 +851,7 @@ update_dynamic_varobj_children (struct varobj *var,
|
||||
|
||||
install_dynamic_child (var, can_mention ? changed : NULL,
|
||||
can_mention ? type_changed : NULL,
|
||||
can_mention ? new : NULL,
|
||||
can_mention ? newobj : NULL,
|
||||
can_mention ? unchanged : NULL,
|
||||
can_mention ? cchanged : NULL, i,
|
||||
item);
|
||||
@ -1622,11 +1622,11 @@ varobj_value_has_mutated (const struct varobj *var, struct value *new_value,
|
||||
to point to the new varobj. */
|
||||
|
||||
VEC(varobj_update_result) *
|
||||
varobj_update (struct varobj **varp, int explicit)
|
||||
varobj_update (struct varobj **varp, int is_explicit)
|
||||
{
|
||||
int type_changed = 0;
|
||||
int i;
|
||||
struct value *new;
|
||||
struct value *newobj;
|
||||
VEC (varobj_update_result) *stack = NULL;
|
||||
VEC (varobj_update_result) *result = NULL;
|
||||
|
||||
@ -1635,7 +1635,7 @@ varobj_update (struct varobj **varp, int explicit)
|
||||
changing type. One use case for frozen varobjs is
|
||||
retaining previously evaluated expressions, and we don't
|
||||
want them to be reevaluated at all. */
|
||||
if (!explicit && (*varp)->frozen)
|
||||
if (!is_explicit && (*varp)->frozen)
|
||||
return result;
|
||||
|
||||
if (!(*varp)->root->is_valid)
|
||||
@ -1660,15 +1660,15 @@ varobj_update (struct varobj **varp, int explicit)
|
||||
the frame in which a local existed. We are letting the
|
||||
value_of_root variable dispose of the varobj if the type
|
||||
has changed. */
|
||||
new = value_of_root (varp, &type_changed);
|
||||
if (update_type_if_necessary(*varp, new))
|
||||
newobj = value_of_root (varp, &type_changed);
|
||||
if (update_type_if_necessary(*varp, newobj))
|
||||
type_changed = 1;
|
||||
r.varobj = *varp;
|
||||
r.type_changed = type_changed;
|
||||
if (install_new_value ((*varp), new, type_changed))
|
||||
if (install_new_value ((*varp), newobj, type_changed))
|
||||
r.changed = 1;
|
||||
|
||||
if (new == NULL)
|
||||
if (newobj == NULL)
|
||||
r.status = VAROBJ_NOT_IN_SCOPE;
|
||||
r.value_installed = 1;
|
||||
|
||||
@ -1703,15 +1703,15 @@ varobj_update (struct varobj **varp, int explicit)
|
||||
{
|
||||
struct type *new_type;
|
||||
|
||||
new = value_of_child (v->parent, v->index);
|
||||
if (update_type_if_necessary(v, new))
|
||||
newobj = value_of_child (v->parent, v->index);
|
||||
if (update_type_if_necessary(v, newobj))
|
||||
r.type_changed = 1;
|
||||
if (new)
|
||||
new_type = value_type (new);
|
||||
if (newobj)
|
||||
new_type = value_type (newobj);
|
||||
else
|
||||
new_type = v->root->lang_ops->type_of_child (v->parent, v->index);
|
||||
|
||||
if (varobj_value_has_mutated (v, new, new_type))
|
||||
if (varobj_value_has_mutated (v, newobj, new_type))
|
||||
{
|
||||
/* The children are no longer valid; delete them now.
|
||||
Report the fact that its type changed as well. */
|
||||
@ -1723,7 +1723,7 @@ varobj_update (struct varobj **varp, int explicit)
|
||||
r.type_changed = 1;
|
||||
}
|
||||
|
||||
if (install_new_value (v, new, r.type_changed))
|
||||
if (install_new_value (v, newobj, r.type_changed))
|
||||
{
|
||||
r.changed = 1;
|
||||
v->updated = 0;
|
||||
@ -1735,7 +1735,7 @@ varobj_update (struct varobj **varp, int explicit)
|
||||
if (varobj_is_dynamic_p (v))
|
||||
{
|
||||
VEC (varobj_p) *changed = 0, *type_changed = 0, *unchanged = 0;
|
||||
VEC (varobj_p) *new = 0;
|
||||
VEC (varobj_p) *newobj = 0;
|
||||
int i, children_changed = 0;
|
||||
|
||||
if (v->frozen)
|
||||
@ -1767,14 +1767,14 @@ varobj_update (struct varobj **varp, int explicit)
|
||||
|
||||
/* If update_dynamic_varobj_children returns 0, then we have
|
||||
a non-conforming pretty-printer, so we skip it. */
|
||||
if (update_dynamic_varobj_children (v, &changed, &type_changed, &new,
|
||||
if (update_dynamic_varobj_children (v, &changed, &type_changed, &newobj,
|
||||
&unchanged, &children_changed, 1,
|
||||
v->from, v->to))
|
||||
{
|
||||
if (children_changed || new)
|
||||
if (children_changed || newobj)
|
||||
{
|
||||
r.children_changed = 1;
|
||||
r.new = new;
|
||||
r.newobj = newobj;
|
||||
}
|
||||
/* Push in reverse order so that the first child is
|
||||
popped from the work stack first, and so will be
|
||||
|
@ -75,7 +75,7 @@ typedef struct varobj_update_result_t
|
||||
It lists the new children (which must necessarily come at the end
|
||||
of the child list) added during an update. The caller is
|
||||
responsible for freeing this vector. */
|
||||
VEC (varobj_p) *new;
|
||||
VEC (varobj_p) *newobj;
|
||||
} varobj_update_result;
|
||||
|
||||
DEF_VEC_O (varobj_update_result);
|
||||
@ -303,7 +303,7 @@ extern void all_root_varobjs (void (*func) (struct varobj *var, void *data),
|
||||
void *data);
|
||||
|
||||
extern VEC(varobj_update_result) *varobj_update (struct varobj **varp,
|
||||
int explicit);
|
||||
int is_explicit);
|
||||
|
||||
extern void varobj_invalidate (void);
|
||||
|
||||
|
@ -1028,7 +1028,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
|
||||
/* fcn_cs_saved is global because process_xcoff_symbol needs it. */
|
||||
union internal_auxent fcn_aux_saved = main_aux;
|
||||
struct context_stack *new;
|
||||
struct context_stack *newobj;
|
||||
|
||||
char *filestring = " _start_ "; /* Name of the current file. */
|
||||
|
||||
@ -1355,13 +1355,13 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
|
||||
within_function = 1;
|
||||
|
||||
new = push_context (0, fcn_start_addr + off);
|
||||
newobj = push_context (0, fcn_start_addr + off);
|
||||
|
||||
new->name = define_symbol
|
||||
newobj->name = define_symbol
|
||||
(fcn_cs_saved.c_value + off,
|
||||
fcn_stab_saved.c_name, 0, 0, objfile);
|
||||
if (new->name != NULL)
|
||||
SYMBOL_SECTION (new->name) = SECT_OFF_TEXT (objfile);
|
||||
if (newobj->name != NULL)
|
||||
SYMBOL_SECTION (newobj->name) = SECT_OFF_TEXT (objfile);
|
||||
}
|
||||
else if (strcmp (cs->c_name, ".ef") == 0)
|
||||
{
|
||||
@ -1379,17 +1379,17 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
within_function = 0;
|
||||
break;
|
||||
}
|
||||
new = pop_context ();
|
||||
newobj = pop_context ();
|
||||
/* Stack must be empty now. */
|
||||
if (context_stack_depth > 0 || new == NULL)
|
||||
if (context_stack_depth > 0 || newobj == NULL)
|
||||
{
|
||||
ef_complaint (cs->c_symnum);
|
||||
within_function = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
finish_block (new->name, &local_symbols, new->old_blocks,
|
||||
new->start_addr,
|
||||
finish_block (newobj->name, &local_symbols, newobj->old_blocks,
|
||||
newobj->start_addr,
|
||||
(fcn_cs_saved.c_value
|
||||
+ fcn_aux_saved.x_sym.x_misc.x_fsize
|
||||
+ ANOFFSET (objfile->section_offsets,
|
||||
@ -1459,7 +1459,7 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
if (strcmp (cs->c_name, ".bb") == 0)
|
||||
{
|
||||
depth++;
|
||||
new = push_context (depth,
|
||||
newobj = push_context (depth,
|
||||
(cs->c_value
|
||||
+ ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile))));
|
||||
@ -1471,8 +1471,8 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
eb_complaint (cs->c_symnum);
|
||||
break;
|
||||
}
|
||||
new = pop_context ();
|
||||
if (depth-- != new->depth)
|
||||
newobj = pop_context ();
|
||||
if (depth-- != newobj->depth)
|
||||
{
|
||||
eb_complaint (cs->c_symnum);
|
||||
break;
|
||||
@ -1480,13 +1480,13 @@ read_xcoff_symtab (struct objfile *objfile, struct partial_symtab *pst)
|
||||
if (local_symbols && context_stack_depth > 0)
|
||||
{
|
||||
/* Make a block for the local symbols within. */
|
||||
finish_block (new->name, &local_symbols, new->old_blocks,
|
||||
new->start_addr,
|
||||
finish_block (newobj->name, &local_symbols, newobj->old_blocks,
|
||||
newobj->start_addr,
|
||||
(cs->c_value
|
||||
+ ANOFFSET (objfile->section_offsets,
|
||||
SECT_OFF_TEXT (objfile))));
|
||||
}
|
||||
local_symbols = new->locals;
|
||||
local_symbols = newobj->locals;
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user