----- Original Message -----
>>>
>>> And what happens when a backtrace is attempted on such a task?
>>>
>>> Since the current code would not set BT_USER_SPACE, I'm guessing that
it
>>> would run into this (at least on x86_64):
>>>
>>> if (!(bt->flags & BT_USER_SPACE) && (!rsp ||
!accessible(rsp))) {
>>> error(INFO, "cannot determine starting stack
>>> pointer\n");
>>> return;
>>> }
>>
>> Yes, crash will run into this on x86_64.
>
> OK, so why not change the above to do something like this:
>
> if (!(bt->flags & BT_USER_SPACE) && (!rsp ||
!accessible(rsp))) {
> fprintf(ofp, "cannot determine starting stack
pointer\n");
> if(KVMDUMP_DUMPFILE())
> kvmdump_display_regs(bt->tc->processor,
> ofp);
> else if (ELF_NOTES_VALID() && DISKDUMP_DUMPFILE())
> diskdump_display_regs(bt->tc->processor,
> ofp);
> else if (SADUMP_DUMPFILE()) {
> sadump_display_regs(bt->tc->processor,
> ofp);
> return;
> }
>
> Dave
Agree with it. But we should init ofp earlier, and we should add the
same code in the function x86_back_trace_cmd().
Thanks
Wen Congyang
Yes, I'll do that as well.
Thanks Wen,
Dave