summaryrefslogtreecommitdiffstats
path: root/loc2c.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2009-09-17 13:13:29 -0700
committerRoland McGrath <roland@redhat.com>2009-09-17 13:13:29 -0700
commit0c254456b929440f2065d9af397e57b0de79a919 (patch)
treeb26500db2a286783581536f9ce63555445988ac7 /loc2c.c
parent45d7e32572c4aafde1428b305541330aaf2692f3 (diff)
downloadsystemtap-steved-0c254456b929440f2065d9af397e57b0de79a919.tar.gz
systemtap-steved-0c254456b929440f2065d9af397e57b0de79a919.tar.xz
systemtap-steved-0c254456b929440f2065d9af397e57b0de79a919.zip
Unfinished nits in loc_value code.
Diffstat (limited to 'loc2c.c')
-rw-r--r--loc2c.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/loc2c.c b/loc2c.c
index c5859df4..8fc4685a 100644
--- a/loc2c.c
+++ b/loc2c.c
@@ -194,6 +194,8 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
tos_register = -1;
}
+ bool tos_value = false;
+
if (input != NULL)
switch (input->type)
{
@@ -201,6 +203,11 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
push ("addr");
break;
+ case loc_value:
+ push ("addr");
+ tos_value = true;
+ break;
+
case loc_register:
tos_register = input->reg.regno;
break;
@@ -212,7 +219,6 @@ translate (struct obstack *pool, int indent, Dwarf_Addr addrbias,
size_t i;
- bool tos_value = false;
bool used_deref = false;
inline const char *finish (struct location *piece)
{
@@ -1924,7 +1930,7 @@ static void
emit_loc_address (FILE *out, struct location *loc, unsigned int indent,
const char *target)
{
- assert (loc->type == loc_address);
+ assert (loc->type == loc_address || loc->type == loc_value);
if (loc->address.stack_depth == 0)
/* Synthetic program. */
@@ -1966,6 +1972,7 @@ emit_loc_value (FILE *out, struct location *loc, unsigned int indent,
break;
case loc_address:
+ case loc_value:
emit_loc_address (out, loc, indent, target);
break;
}
@@ -1988,6 +1995,7 @@ c_emit_location (FILE *out, struct location *loc, int indent)
break;
case loc_address:
+ case loc_value:
if (declared_addr)
break;
declared_addr = true;
@@ -2017,6 +2025,7 @@ c_emit_location (FILE *out, struct location *loc, int indent)
switch (loc->type)
{
case loc_address:
+ case loc_value:
/* Emit the program fragment to calculate the address. */
emit_loc_value (out, loc, indent + 1, "addr", false);
deref = deref || loc->address.used_deref;