Problems with openMSX debugger symbols

ページ 1/2
| 2

By BadWolf359

Resident (38)

BadWolf359 さんの画像

13-03-2023, 00:14

Hey Guys! I'm trying to debug some assembler code with openMSX debugger.
I've loaded openMSX with my (DOS1) program and placed a breakpoint at #0100. In the debugger tool I open the Symbol manager and add the ".sym" file generated by SjASMPlus with option "--sym=./debug/test.sym".

The problem is I still don't see symbols/labels in the "code view" window. I tried reloading. Complete reboot. Nothing.

The .sym file is filled with data like this:

Begin: EQU 0x00000100
MxMQ: EQU 0x00000FCB
MxMQ.Size: EQU 0x000016BB
MxMQ.Test: EQU 0x000016A4
MxMQ__Dispatch: EQU 0x0000104B
MxMQ__Dispatch.CheckPrio2_3: EQU 0x00001054
MxMQ__Dispatch.Prio1: EQU 0x0000106C

Anyone know what I'm doing wrong?

EDIT: If I add an "Address label" manually in the debugger: "Begin", "Jump label" Value=$0100 it does show that. But doesn't show the labels in the Sym file on this window.

ログイン/登録して投稿

By santiontanon

Paragon (1831)

santiontanon さんの画像

13-03-2023, 03:02

it should work, but one detail is that I see that those addresses have 8 hexadecimal digits, instead of 4. Have you tried to see if that is the problem?

By BadWolf359

Resident (38)

BadWolf359 さんの画像

13-03-2023, 10:17

I've tried manually changing the addresses to 0x0100 or even $0100 but that doesn't solve it either.
Looking at the source code of the debugger (Symbol table part), this should work. I'm not that experienced in C++ code, but I think everything is correct.

By Manuel

Ascended (19678)

Manuel さんの画像

13-03-2023, 12:48

Did you build your debugger from source?

By santiontanon

Paragon (1831)

santiontanon さんの画像

13-03-2023, 12:50

I think I found the problem Smile

The debugger expects "equ" in lower case. I just tried replacing those upper case EQU by lower case ones, and the debugger loads the symbol file fine Smile

By BadWolf359

Resident (38)

BadWolf359 さんの画像

13-03-2023, 16:07

@Manuel: I did not build it myself, I used:
sudo apt install openmsx-debugger
and that gave me version 0.10.0 which is the latest version.

santiontanon wrote:

I think I found the problem :)

The debugger expects "equ" in lower case. I just tried replacing those upper case EQU by lower case ones, and the debugger loads the symbol file fine :)

Sadly for me it doesn't work. I tried with uppercase and lowercase. With 8 numbers (32 bits) or 4 numbers (16 bits). Starting with 0x or with $. No error, but no labels in the "Symbol Manager/Address labels" tab and no labels in the "code view".

But if I add a label manually in the "Symbol Manager/Address labels" tab it does show it in "code view".

I really don't get it. Even if I create a new .sym file with only 2 or 3 labels it doesn't work. Maybe there is a file qualification I'm missing... Linux file Permissions are also ok: "-rw-rw-r--". It's the format SjASMplus outputs so it should work.

@santiontanon: Could you maybe share a short .sym that worked for you?

By santiontanon

Paragon (1831)

santiontanon さんの画像

13-03-2023, 16:18

I am at work right now, and don't have access to my personal computer, but I just copy/pasted the one you had above into an empty file. At the beginning it didn't work, but I noticed in the source code of the debugger that it looks for the "equ" string in lower-case. So, I changed that and then it worked for me! (I had previously changed the hex numbers to 4 digits, but I am not sure if that played a factor). Also, when doing small changes to the .sym file to try again, "reloading" the file in the debugger was not enough, I had to "remove it" and then re-add it. Otherwise, it would not work.

By Grauw

Ascended (10820)

Grauw さんの画像

13-03-2023, 18:20

As far as I can tell from the source code it does a case-insensitive match, and the number is parsed to a 32-bit integer with either a h suffix, 0x prefix or decimal. So I can’t explain why it doesn’t work. Perhaps the package is unmaintained and the version you get through apt-get is really old?

By santiontanon

Paragon (1831)

santiontanon さんの画像

13-03-2023, 18:18

That could be! I do not think I have the latest debugger.

By Grauw

Ascended (10820)

Grauw さんの画像

13-03-2023, 18:25

By BadWolf359

Resident (38)

BadWolf359 さんの画像

13-03-2023, 19:01

Great, Thanx! With some fiddling with the .sym file I managed to get it to work. I don't know why I couldn't get it to work before. But it would of course be easier if it was always done automatically.
@Grauw: Could you perhaps tell me how I can download (and possibly compile) that newer version in Ubuntu? Because I don't think I can use the APT package manager for this. Or could I?

ページ 1/2
| 2