aboutsummaryrefslogtreecommitdiff
path: root/gdb/macrotab.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-16 00:18:02 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-16 00:18:02 +0000
commitb8d56208c522b6a27efe7790770ef65a3031da7b (patch)
treebb5517e441b30a41ff80bf566f33988cd98630d1 /gdb/macrotab.c
parent54534c15fe4c4642034894c7d99c5d945c9c3792 (diff)
downloadgdb-b8d56208c522b6a27efe7790770ef65a3031da7b.zip
gdb-b8d56208c522b6a27efe7790770ef65a3031da7b.tar.gz
gdb-b8d56208c522b6a27efe7790770ef65a3031da7b.tar.bz2
2010-05-15 Michael Snyder <msnyder@vmware.com>
* m2-lang.c: White space. * m2-valprint.c: White space. * macrocmd.c: White space. * macroexp.c: White space. * macroscope.c: White space. * macrotab.c: White space. * main.c: White space. * maint.c: White space. * mdebugread.c: White space. * memattr.c: White space. * minsyms.c: White space. * monitor.c: White space.
Diffstat (limited to 'gdb/macrotab.c')
-rw-r--r--gdb/macrotab.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/macrotab.c b/gdb/macrotab.c
index 4dd6382..93651ab 100644
--- a/gdb/macrotab.c
+++ b/gdb/macrotab.c
@@ -113,6 +113,7 @@ macro_bcache (struct macro_table *t, const void *addr, int len)
else
{
void *copy = xmalloc (len);
+
memcpy (copy, addr, len);
return copy;
}
@@ -316,6 +317,7 @@ key_compare (struct macro_key *key,
const char *name, struct macro_source_file *file, int line)
{
int names = strcmp (key->name, name);
+
if (names)
return names;
@@ -879,6 +881,7 @@ macro_definition_location (struct macro_source_file *source,
if (n)
{
struct macro_key *key = (struct macro_key *) n->key;
+
*definition_line = key->start_line;
return key->start_file;
}
@@ -905,6 +908,7 @@ foreach_macro (splay_tree_node node, void *arg)
struct macro_for_each_data *datum = (struct macro_for_each_data *) arg;
struct macro_key *key = (struct macro_key *) node->key;
struct macro_definition *def = (struct macro_definition *) node->value;
+
(*datum->fn) (key->name, def, datum->user_data);
return 0;
}
@@ -915,6 +919,7 @@ macro_for_each (struct macro_table *table, macro_callback_fn fn,
void *user_data)
{
struct macro_for_each_data datum;
+
datum.fn = fn;
datum.user_data = user_data;
datum.file = NULL;
@@ -946,6 +951,7 @@ macro_for_each_in_scope (struct macro_source_file *file, int line,
macro_callback_fn fn, void *user_data)
{
struct macro_for_each_data datum;
+
datum.fn = fn;
datum.user_data = user_data;
datum.file = file;