Bug 3898

Summary: fstack and fhpd disagree on backtrace format
Product: frysk Reporter: Andrew Cagney <cagney>
Component: generalAssignee: Nurdin Premji <npremji>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Bug Depends on:    
Bug Blocks: 2244, 2246    
Attachments: Proposed patch for CLI to use same string that fstack uses.

Description Andrew Cagney 2007-01-19 23:23:08 UTC
fstack and fhpd format their stack backtraces differently.

ex#1:
  fstack: #0 0x556402 in __kernel_vsyscall ()
  fhpd: # 0 0xcd3402 in __kernel_vsyscall at #0
fstack is better, << at #0 >>, which is a non-existant line, shouldn't be included.

ex#2:
  fstack: #5 0x81133e9 in _start () from: ../../stack.c#225
  fhpd: # 5 0x81133e9 in _start at ../../stack.c#225
(ignoring that I strongly doubt that "_start" is in stack.c), their output
should be consistent.

Likely there should be a generic method, that when passed a stack backtrace
formats it to a writer.
Comment 1 Nurdin Premji 2007-01-23 15:27:39 UTC
Created attachment 1517 [details]
Proposed patch for CLI to use same string that fstack uses.

I don't know what to run to check the fhpd for backtrace format but I'm fairly
sure this will work.
Comment 2 Stan Cox 2007-01-23 16:29:18 UTC
The fhpd 'where' request has been there quite a while, mostly out of necessity.
 I tried to style it after the hpd doc.  Feel free to change it for the better
as far as I am concerned.
Comment 3 Nurdin Premji 2007-01-23 22:20:31 UTC
Fixed.
January 23, 2007
frysk-core/frysk/cli/CL
	* hpd/CLI.java (WhereHandler.handle): Changed to use Stackframe.toPrint method.
	(UpDownHandler.handle): Ditto.