This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/2497] STP_STRING_SIZE set by stap is too small
- From: "guanglei at cn dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sources dot redhat dot com
- Date: 3 Apr 2006 03:43:47 -0000
- Subject: [Bug runtime/2497] STP_STRING_SIZE set by stap is too small
- References: <20060330093952.2497.guanglei@cn.ibm.com>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From guanglei at cn dot ibm dot com 2006-04-03 03:43 -------
(In reply to comment #7)
>
> If you use print_backtrace() it writes the output directly to stdout so there is
> no limit. EXCEPT I see the ppc64 __stp_stack_sprint() function has put an
> incorrect limit there. Perhaps that is the real problem you are trying to fix?
>
> If you want to fix that function, consider that if "str == _stp_stdout" then the
> output is going to the output buffer, not a string of size STP_STRING_SIZE.
>
Up to now, print_backtrace() works well for me and will give a complete backtrace.
I can call print_backtrace() to print the backtrace, but in fact I want to
combine the string of backtrace with other information to generate the output of
a specific event, like the following:
String str = _stp_string_init (0);
_stp_stack_sprint (str, CONTEXT->regs, 0);
_lket_trace(THIS->var_id, "%1b%4b%1b%ld%4b%4b%s", cmd->device->sdev_state,
scsi_info,
cmd->sc_data_direction, cmd->request_buffer, cmd->request_bufflen,
cmd->device->host->cmd_pid, _stp_string_ptr(str));
So what I want is a larger String obtained by _stp_string_init, while keep all
other strings used by stap the same as before.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=2497
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.