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)
Tue, Jan 21, 1:23 PM
Unknown Object (File)
Sat, Jan 18, 10:23 PM
Unknown Object (File)
Mon, Jan 13, 10:45 AM
Unknown Object (File)
Nov 5 2024, 10:13 PM
Unknown Object (File)
Sep 30 2024, 12:27 AM
Unknown Object (File)
Sep 29 2024, 8:07 PM
Unknown Object (File)
Sep 29 2024, 4:50 AM
Unknown Object (File)
Sep 28 2024, 11:15 PM

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?