Page MenuHomeFreeBSD

[PPC] Fix register context fetch from pcb
AbandonedPublic

Authored by luporl on Dec 11 2019, 2:02 PM.
Referenced Files
Unknown Object (File)
Fri, Apr 19, 11:42 PM
Unknown Object (File)
Feb 17 2024, 10:46 AM
Unknown Object (File)
Jan 31 2024, 10:11 AM
Unknown Object (File)
Jan 14 2024, 3:51 PM
Unknown Object (File)
Dec 22 2023, 10:17 PM
Unknown Object (File)
Nov 19 2023, 11:02 AM
Unknown Object (File)
Sep 13 2023, 9:33 AM
Unknown Object (File)
Aug 28 2023, 12:04 AM

Details

Reviewers
pizzamig
jhb
Group Reviewers
PowerPC
Summary

This change fixes 2 issues in ppcfbsd_supply_pcb():

  • Wrong indexing of pcb.pcb_context[]
  • Initial PC register was not being supplied

With this change, backtrace command works on kgdb, with a live kernel or a crashdump.

Symbol resolution, however, still won't work.
This will be addressed in D21946, from which this change was a part of, but is now in its own separate revision, as it is not related to the symbol resolution issue.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 28077
Build 26222: arc lint + arc unit

Event Timeline

The kgdb bits actually live in github at https://github.com/bsdjhb/gdb/tree/kgdb-8.3 If it's not too hard to make a pull request against that, that would be nicer.

The other thing to consider after that is changing it to be cross-debug friendly. I can help with that. It means not using struct pcb but using a table describing the offsets of the registers from the pcb address.

In D22761#498280, @jhb wrote:

The kgdb bits actually live in github at https://github.com/bsdjhb/gdb/tree/kgdb-8.3 If it's not too hard to make a pull request against that, that would be nicer.

The other thing to consider after that is changing it to be cross-debug friendly. I can help with that. It means not using struct pcb but using a table describing the offsets of the registers from the pcb address.

Ok, I made the pull request there, with these changes.

Can you give me some guidelines of the appropriate way to create a table with struct pcb offsets?