grumpycoders / pcsx-redux

The PCSX-Redux project is a collection of tools, research, hardware design, and libraries aiming at development and reverse engineering on the PlayStation 1. The core product itself, PCSX-Redux, is yet another fork of the Playstation emulator, PCSX.
https://pcsx-redux.consoledev.net
GNU General Public License v2.0
631 stars 94 forks source link

IDA Pro - GDB send manifest? #1022

Open slayermaster opened 1 year ago

slayermaster commented 1 year ago

Describe the bug

GDB stub is reporting big-endian while it should be little endian. Unticking send manifest will cause registers to have no value.

Expected behavior

GDB stub reports little endian.

Steps to reproduce the bug

  1. Set up GDB-server on PCSX-Redux.
  2. Attach form IDA Pro.
  3. IDA Pro will warn that GDB stub is reporting big endian configuration.

Operating System

Windows 11

PCSX-Redux version

Version: 11147.20221106.5.x64 Changeset: 4ff9dcfaf7bb63a680e9e9bb2507547511f92846 Date & time: 2022-11-07 01:00:35

CPU model

i7-3770

GPU model

GTX 1070

BIOS version

SCPH1001

CPU emulation mode

Interpreter

Additional information

image

nicolasnoble commented 1 year ago

(1) This is a bug in IDA Pro, which is the reason for the manifest checkbox to exist in the first place. We're sending roughly the same manifest as the official gdb binary, and it works properly for other debuggers, which will recognize it as little endian properly. Only IDA has this bug where it derps and goes big endian, as far as I can tell. If you have a support contract with X-Rays, I'd suggest filing a bug with them, and keep the checkbox unchecked when connecting IDA to PCSX-Redux until this is solved by them. Note that this bug has been reported to me by a third party. I do not have access to IDA Pro, and I can't send a support ticket in consequence.

(2) Your screenshot indicates you're running IDA64. You shouldn't do that. IDA64 doesn't mean it's running a 64 bits version of IDA. It means it's using processor modules tuned for 64 bits. You want IDA32, to run the MIPS32 module. This is the reason why you're not properly seeing register values when the manifest disabled.