diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-08-07 00:01:04 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-08-07 00:04:09 +0200 |
commit | 1eed9afca1a408fb35e39b9e935011b7b8d3c7ba (patch) | |
tree | 9698e2ba42b634f7edc5f8b21239a9589b9b703b /translate.cxx | |
parent | 696ec1549fcd846f9736a9c96e25f6ba555cd3e4 (diff) | |
download | systemtap-steved-1eed9afca1a408fb35e39b9e935011b7b8d3c7ba.tar.gz systemtap-steved-1eed9afca1a408fb35e39b9e935011b7b8d3c7ba.tar.xz systemtap-steved-1eed9afca1a408fb35e39b9e935011b7b8d3c7ba.zip |
PR10486 Raise default MAXSTRINGLEN.
* translate.cxx (translate_pass): Raise MAXSTRINGLEN to 256 for 32bit arches
and to 512 for 64bit arches.
* testsuite/systemtap.context/backtrace.tcl: Don't set MAXSTRINGLEN.
* testsuite/systemtap.exelib/ustack.tcl: Likewise.
* testsuite/systemtap.string/str_replace.exp: Explicitly set MAXSTRINGLEN.
Diffstat (limited to 'translate.cxx')
-rw-r--r-- | translate.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/translate.cxx b/translate.cxx index 4a6a10b5..1ddc1778 100644 --- a/translate.cxx +++ b/translate.cxx @@ -5106,9 +5106,18 @@ translate_pass (systemtap_session& s) s.op->newline() << "#ifndef MAXNESTING"; s.op->newline() << "#define MAXNESTING 10"; s.op->newline() << "#endif"; + + // Strings are used for storing backtraces, they are larger on 64bit + // so raise the size on 64bit architectures. PR10486 + s.op->newline() << "#include <asm/types.h>"; s.op->newline() << "#ifndef MAXSTRINGLEN"; - s.op->newline() << "#define MAXSTRINGLEN 128"; + s.op->newline() << "#if BITS_PER_LONG == 32"; + s.op->newline() << "#define MAXSTRINGLEN 256"; + s.op->newline() << "#else"; + s.op->newline() << "#define MAXSTRINGLEN 512"; + s.op->newline() << "#endif"; s.op->newline() << "#endif"; + s.op->newline() << "#ifndef MAXACTION"; s.op->newline() << "#define MAXACTION 1000"; s.op->newline() << "#endif"; |