VOGONS


First post, by louisg

User metadata
Rank Newbie
Rank
Newbie

Hi, I've been developing a 3d perspective plane routine using DJGPP and RHIDE, and was wondering if anyone knew how I can set a breakpoint at the beginning of an assembly function (in a .s file, not inlined). Disconcertingly, GDB crashes outright when I try to run it with my program. From RHIDE (where the debugger does not crash), I tried setting a break in the .s file as well as stepping into it from the C caller, but neither worked.

I'm also wondering if DJGPP+RHIDE is even a good choice for a project like this. Maybe I would be better off with Borland or Digital Mars..? Any opinions?

Reply 1 of 6, by root42

User metadata
Rank l33t
Rank
l33t

Define "gdb crashes". Gdb is usually a very solid program. However I haven’t used DJGPP in ages, so it might differ from the experience under Linux.

YouTube and Bonus
80486DX@33 MHz, 16 MiB RAM, Tseng ET4000 1 MiB, SnarkBarker & GUSar Lite, PC MIDI Card+X2+SC55+MT32, OSSC

Reply 2 of 6, by louisg

User metadata
Rank Newbie
Rank
Newbie
root42 wrote:

Define "gdb crashes". Gdb is usually a very solid program. However I haven’t used DJGPP in ages, so it might differ from the experience under Linux.

I'm not sure it's as solid as it is under Linux; I've very rarely seen it not able to handle something. Under DOS, here's what it does with my program: It starts reading the symbols, but then receives a SIGABRT, dumps registers to the screen, and punts me back to the DOS prompt (not a GDB prompt).

Reply 3 of 6, by louisg

User metadata
Rank Newbie
Rank
Newbie

Hmm this is interesing; I did int 3, and that didn't trigger a break either. Isn't that the appropriate int to call if I want to trigger a break programmatically?

EDIT: Ok I just notice int 3 causes it to *exit* due to SIGTRAP. Hmm, I guess the rhide debugger rhgdb isn't set up so that causes a break. (This is a different gdb from the one that was crashing)

Reply 4 of 6, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

Few years ago (and I mean like 2 or 3, not 20) there were major changes in DJGPP and GDB (the format of debugging symbols changed, if I remember correctly) so it may well be that Rhide is no longer compatible with current DJGPP and GDB.

So you may want to try older versions (before 2015 or so) of DJGPP packages if you want fully functional Rhide.

I'll try some simple GDB debugging under DJGPP later today.

Also keep in mind that the recommended platform for DJGPP development is Windows XP.

Reply 5 of 6, by louisg

User metadata
Rank Newbie
Rank
Newbie
Azarien wrote:
Few years ago (and I mean like 2 or 3, not 20) there were major changes in DJGPP and GDB (the format of debugging symbols change […]
Show full quote

Few years ago (and I mean like 2 or 3, not 20) there were major changes in DJGPP and GDB (the format of debugging symbols changed, if I remember correctly) so it may well be that Rhide is no longer compatible with current DJGPP and GDB.

So you may want to try older versions (before 2015 or so) of DJGPP packages if you want fully functional Rhide.

I'll try some simple GDB debugging under DJGPP later today.

Also keep in mind that the recommended platform for DJGPP development is Windows XP.

Oh hmm, I didn't realize the devs had shifted focus like that. I run it under pure DOS mode. Let me know how debugging a .s file goes.

This is 2.95.3, from '01. But GDB is 8.0.1, from just a few years ago! This might be part of the problem. Though I think gdb.exe isn't used by rhide..?

EDIT: I moved the new gdb out of the way, and rhide debugger continued to function fine. So, it's not that. The rest of the files have sane modification dates on them ('99 to '01).

Reply 6 of 6, by louisg

User metadata
Rank Newbie
Rank
Newbie

OK, I think I found it. It wasn't producing all the symbols it needed. It finally popped up an error saying there were no usable symbols. I'm not quite sure why; it was compiling with -g -O0. When I added -g a second time under Compiler Options, it worked. Got my (very inefficient right now) texture mapping routine working now too!