This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/2497] STP_STRING_SIZE set by stap is too small


------- Additional Comments From guij at cn dot ibm dot com  2006-04-04 02:08 -------
(In reply to comment #9)
> But aren't there just two possibilities?
> 1. You print the backtrace.
> 2. You get the backtrace in a string and save it in an array.
> 
> For #1, you use print_backtrace. For #2, you need to have all strings be
> larger, as it is done now.
> 
> In your example above, you would just write something like this in
> script:
> 
> bin_write("%1b%4b%1b%ld%4b%4b", cmd->device->sdev_state, [...])
> print_backtrace()
> 
I think _lket_trace() is more like:
bin_write("%n%1b%4b%1b%ld%4b%4b%s",this_event_len(), cmd->device->sdev_state,
[...], _stp_string_ptr(str))
The total length of the trace record (including backtrace string) is to be
calculated and filled by bin_write(), thus only #2 can work.


-- 


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]