Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger support #1

Open
SamuraiCrow opened this issue Jan 6, 2020 · 17 comments
Open

Debugger support #1

SamuraiCrow opened this issue Jan 6, 2020 · 17 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@SamuraiCrow
Copy link
Contributor

Generate metadata for source-level debugging.

@SamuraiCrow SamuraiCrow added enhancement New feature or request High priority labels Jan 6, 2020
@SamuraiCrow
Copy link
Contributor Author

While AmigaE may have padded out the size of each opcode to 3 words to allow them to be replaced with a JSR with an absolute address, I propose the debugger should use one NOP after before each E instruction for replacement with an Illegal Trap Vector invocation for breakpoints.

@SamuraiCrow
Copy link
Contributor Author

ECX already included line debugging so maybe standard STABS debugging with BDebug for AmigaOS 3 and earlier is an option. DWARF debugging would work with GDB on AmigaOS 4 and MorphOS. This would make EDBG unneeded but BDebug is closed source.

@Hypexed
Copy link

Hypexed commented Aug 11, 2021

The EC compiler should only output one NOP for substituting with a trap code as you describe. The only exception I know to this is my custom EC compiler that added three NOPs so a JSR could be substituted in place. And would work on OS4.

@Hypexed
Copy link

Hypexed commented Aug 11, 2021

It would help to include standard STABS support so code lines can be located from crash logs. Another issue is DisElf, made for the job, is buggy and crashes bad on OS4 with a trap. However, I still think EDBG or similar would be needed. As for one thing, GDB has been broken on OS4 for almost ten years, no sign it will be fixed. Another is EDBG is the only E source level debugger I'm aware of. And with my EDBG-OS4 patch the only one that works direct on OS4.

@SamuraiCrow
Copy link
Contributor Author

@Hypexed Thanks for your input and knowledge. Would you like to join the team?

@Hypexed
Copy link

Hypexed commented Aug 11, 2021

Sure!

@SamuraiCrow
Copy link
Contributor Author

Welcome!

@Hypexed
Copy link

Hypexed commented Aug 11, 2021

Thanks. :-)

@dmcoles dmcoles self-assigned this Sep 16, 2022
@dmcoles
Copy link
Contributor

dmcoles commented Sep 16, 2022

i've started looking at this. I have added some small changes to EEC to add the necessary NOP instruction and some changes to EDBG to improve the hunk structure handling to cope with EEC files. Currently I am able to step through EEC compiled executables (68k only) using EDBG in OS 3 and OS 4. It is not possible to view variable contents though

@SamuraiCrow
Copy link
Contributor Author

Thanks for taking this on!

@dmcoles
Copy link
Contributor

dmcoles commented Sep 22, 2022

Attached is an updated wip EDBG that should support the LDBG and VDBG debug hunks created by EEC.

It will allow you to debug 68k executables generated with EEC but doesn't understand all the EEC/ECX variable types so is quite limited when viewing variable contents at the moment.

EDBG.zip

@SamuraiCrow
Copy link
Contributor Author

The EDBG that comes with E-VO 3.6.0 says it will work with ECX so it should work here also. It's 68k only at the moment but this could soon be fixed!

@Hypexed
Copy link

Hypexed commented Jul 12, 2023

So at this point the survivors tend to be ECX, EEC and E-VO. At this point it looks like ECX could be depreciated along with EC. But, are all features covered by EEC and E-VO? I suppose the one redeeming feature of ECX would be PPC support.

@Hypexed
Copy link

Hypexed commented Jul 12, 2023

i've started looking at this. I have added some small changes to EEC to add the necessary NOP instruction and some changes to EDBG to improve the hunk structure handling to cope with EEC files. Currently I am able to step through EEC compiled executables (68k only) using EDBG in OS 3 and OS 4. It is not possible to view variable contents though

I'm interested in how you did this. How you modified EDBG to patch NOPs so it works on OS4. Do you substitute a TRAP or something?

@Hypexed Hypexed closed this as completed Jul 12, 2023
@Hypexed Hypexed reopened this Jul 12, 2023
@SamuraiCrow
Copy link
Contributor Author

So at this point the survivors tend to be ECX, EEC and E-VO. At this point it looks like ECX could be depreciated along with EC. But, are all features covered by EEC and E-VO? I suppose the one redeeming feature of ECX would be PPC support.

EEC is a fork to continue development of ECX. ECX has stalled. If Leif wanted to continue development of ECX, our issue tracker could simply be moved to his. Most of the changes were just getting the sources to build.

@dmcoles
Copy link
Contributor

dmcoles commented Jul 12, 2023

I'm interested in how you did this. How you modified EDBG to patch NOPs so it works on OS4. Do you substitute a TRAP or something?

Yes it adds 3 NOPs instead of just 1 and uses a JSR instruction instead. Both EVO and EEC can produce debug output with either 1 NOP or 3 so you can use the latest edbg with 68k code compiled with either compiler under OS 3.x and OS 4.x

@Hypexed
Copy link

Hypexed commented Jul 20, 2023

Ah okay I see. Yes checked how it was done. So using the same method I did years ago. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants