summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordsmith <dsmith>2008-01-28 15:51:16 +0000
committerdsmith <dsmith>2008-01-28 15:51:16 +0000
commitb0986e7ae55d82ffd6ddc399a16237fbb1efe6f9 (patch)
tree0944b76db337e6af6462e1ec76367a8264a829d2
parentf71cda0c26d5f1e5f7ed91861bd4a8e26dfe9786 (diff)
downloadsystemtap-steved-b0986e7ae55d82ffd6ddc399a16237fbb1efe6f9.tar.gz
systemtap-steved-b0986e7ae55d82ffd6ddc399a16237fbb1efe6f9.tar.xz
systemtap-steved-b0986e7ae55d82ffd6ddc399a16237fbb1efe6f9.zip
2008-01-28 David Smith <dsmith@redhat.com>
* tapsets.cxx (dwarf_derived_probe_group::emit_module_decls): Added 'const' to several members of stap_dwarf_probes.
-rw-r--r--ChangeLog3
-rw-r--r--tapsets.cxx12
2 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index ad537118..d496f104 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-01-28 David Smith <dsmith@redhat.com>
+ * tapsets.cxx (dwarf_derived_probe_group::emit_module_decls):
+ Added 'const' to several members of stap_dwarf_probes.
+
PR 5685. From Eugeniy Meshcheryakov <eugen@debian.org>
* configure.ac: If "--enable-sqlite" is specified, define
HAVE_LIBSQLITE3.
diff --git a/tapsets.cxx b/tapsets.cxx
index d753dc2e..336abb9c 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -3826,10 +3826,10 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
// NB: bss!
s.op->newline() << "struct stap_dwarf_probe {";
- s.op->newline(1) << "unsigned return_p:1;";
- s.op->newline() << "unsigned maxactive_p:1;";
+ s.op->newline(1) << "const unsigned return_p:1;";
+ s.op->newline() << "const unsigned maxactive_p:1;";
s.op->newline() << "unsigned registered_p:1;";
- s.op->newline() << "unsigned short maxactive_val;";
+ s.op->newline() << "const unsigned short maxactive_val;";
// Let's find some stats for the three embedded strings. Maybe they
// are small and uniform enough to justify putting char[MAX]'s into
@@ -3862,7 +3862,7 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
} \
else \
{ \
- s.op->newline() << "const char *" << #var << ";"; \
+ s.op->newline() << "const char * const " << #var << ";"; \
if (s.verbose > 2) clog << "stap_dwarf_probe *" << #var << endl; \
}
@@ -3870,8 +3870,8 @@ dwarf_derived_probe_group::emit_module_decls (systemtap_session& s)
CALCIT(section);
CALCIT(pp);
- s.op->newline() << "unsigned long address;";
- s.op->newline() << "void (*ph) (struct context*);";
+ s.op->newline() << "const unsigned long address;";
+ s.op->newline() << "void (* const ph) (struct context*);";
s.op->newline(-1) << "} stap_dwarf_probes[] = {";
s.op->indent(1);