summaryrefslogtreecommitdiffstats
path: root/elaborate.cxx
diff options
context:
space:
mode:
authorfche <fche>2005-05-24 15:03:16 +0000
committerfche <fche>2005-05-24 15:03:16 +0000
commitbed7c0afb62154918b411c325faa619749f1c050 (patch)
tree8cfd907f91b64bb7ffa3835e636541045295cde1 /elaborate.cxx
parentd4f41a6f345a85e9eccd3471990f5458cc687daf (diff)
downloadsystemtap-steved-bed7c0afb62154918b411c325faa619749f1c050.tar.gz
systemtap-steved-bed7c0afb62154918b411c325faa619749f1c050.tar.xz
systemtap-steved-bed7c0afb62154918b411c325faa619749f1c050.zip
2005-05-24 Frank Ch. Eigler <fche@redhat.com>
* elaborate.cxx (find_array): Support automagic tapset globals. * testsuite/semok/nine.stp: Test it ... * testsuite/semlib/g2.stp: ... using this global array. * staptree.cxx (stapfile print): List globals.
Diffstat (limited to 'elaborate.cxx')
-rw-r--r--elaborate.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/elaborate.cxx b/elaborate.cxx
index 0f308c68..cac773bf 100644
--- a/elaborate.cxx
+++ b/elaborate.cxx
@@ -352,9 +352,12 @@ symresolution_info::find_array (const string& name, unsigned arity)
{
stapfile* f = session.library_files[i];
for (unsigned j=0; j<f->globals.size(); j++)
- if (f->globals[j]->name == name &&
- f->globals[j]->index_types.size() == arity)
+ if (f->globals[j]->name == name)
+ if ((f->globals[j]->arity == (int) arity) ||
+ f->globals[j]->arity < 0)
{
+ f->globals[j]->set_arity (arity);
+
// put library into the queue if not already there
if (0) // (session.verbose_resolution)
cerr << " array " << name << " "