When connecting to 3ds via Luma3ds, "Can't determine the current process's PID: you must name one." #3590
Replies: 10 comments 26 replies
-
It is assuming a lot of things. One being that the target is running linux. This is exactly what I see with a gdb stub I've been working on and am glad to know the garbage seen there isn't my fault 🤣. With that said I have no idea if it is a problem or not. |
Beta Was this translation helpful? Give feedback.
-
So, this (I believe) is the message printed by gdb when the debugger issues an "info proc mappings" call and the stub doesn't know how to respond. We should probably modify our code to stop asking if the stub has failed once. I thought you fixed this for your scenario, though - are you still running your define_info_proc_mappings script? |
Beta Was this translation helpful? Give feedback.
-
I think the answer re 10.0.4 is yes and no. I think we fixed the defaults so that, if you didn't define info_proc_mappings, we supply the correct answer, but we didn't (sigh) fix it so that, if the debugger issued that command again, the command would be defined and you wouldn't be besieged with error messages. The default script resides in the distribution with the name define_info_proc_mappings, but I think you need to modify it because your device is not 64-bit. Should look something like: define info proc mappings |
Beta Was this translation helpful? Give feedback.
-
Hmmm, that's an interesting idea, i.e. minimum packet set supported. I won't get ot it today, but will try to take a stab next week. Short answer is no, and, unfortunately, it will take a bit of work to recover that info. The old (non-public) debugger communicated using RSP directly, so I could have told you probably off the top of my head, but the current (public) debugger uses the gdb/MI2 machine interface. This has many many many advantages including better feature support and ease of configuration, but it means we're also one layer away from the raw packets. There's also going to be a difference between the minimum packet set required by the implementation of gdb being used, the packet set typically used by Ghidra as a result of the request made over MI2, and the must-have packet set that will result in failures in Ghidra if not met. I do think qXfer:memory-map:read is the RSP equivalent of "info proc mappings though. |
Beta Was this translation helpful? Give feedback.
-
@d-millar Digging around in #2721. I connected successfully to Luma3ds, opened the registries of the thread that was stopped on, and looked at the registries. I used These steps from #2721 I followed after connecting to Luma3ds:
All that to say that I have something (very little?) working. But still the Threads window is not populated. Any ideas for a next step? Sorry, sorta off-topic. |
Beta Was this translation helpful? Give feedback.
-
OK, so looking good so far. As described in the help, the fact that the Threads (and presumably all windows besides the Objects view and Interpreter) are empty means the recorder is not on. Try explicitly selecting the process in the Objects view and hitting R. If the dialog that comes up is empty, you may have to write an opinion file for your platform. Also, try typing “show architecture” in the Interpreter. That will tell us what gdb believes the architecture is. |
Beta Was this translation helpful? Give feedback.
-
so an opinion is basically a description for the debugger of the architecture. in your case, however, “arm” has an opinion already written for it, so that is not the problem. i have a feeling this is related to the message you got regarding unknown osabi (“3DS”). going to have to look into this a bit before i can suggest a fix, i’m afraid. |
Beta Was this translation helpful? Give feedback.
-
On somewhat related note, if I send
However these files wouldn't exist on the system running gdb but would be on the remote target if it was running linux. |
Beta Was this translation helpful? Give feedback.
-
Alright, @nsadeveloper789 looked into this, and we're going to suggest a workaround, but anyone's guess whether it will work. If you type "set architecture" w/o "arm" or anything else, you "may" get a list of supported architectures back. I would try the one you think is closest to the 3DS's. If I remember correctly, the 3DS is "armhf", but I doubt that will be listed. Maybe try something like "armv7". |
Beta Was this translation helpful? Give feedback.
-
I have a few questions.
|
Beta Was this translation helpful? Give feedback.
-
Hello. I am, once again, trying to debug my 3ds using Luma3ds. I have connected to WSL via SSH, and connected gdb-multiarch (v9.2) on WSL to Luma3ds. Before connecting, I set the architecture to arm, and the endianness to little. After connecting, the objects window is populated (no other windows get any info), and I get the message, "Can't determine the current process's PID: you must name one." I don't know if this is really a problem, but there is also the interpreter's output:
At the end there, it got a little out of control. Of course, I've had this problem before, but what is my actual problem here? The PID not being known, or the order of what I entered in the interpreter? I am sorry if this is not too clear.
Beta Was this translation helpful? Give feedback.
All reactions