Minor fixes to comments.
[AROS.git] / rom / dos / internalloadseg_support.c
blob87f4024d65bdd186f844a29fd92e31e6b92985e2
1 #include <aros/config.h>
2 #include <libraries/debug.h>
3 #include <proto/debug.h>
4 #include <proto/dos.h>
5 #include <proto/exec.h>
7 #include "dos_intern.h"
8 #include "internalloadseg.h"
10 void register_elf(BPTR file, BPTR hunks, struct elfheader *eh, struct sheader *sh, struct DosLibrary *DOSBase)
12 if (DebugBase)
14 char *buffer = AllocMem(512, MEMF_ANY);
16 if (buffer) {
17 if (NameFromFH(file, buffer, 512))
19 char *nameptr = buffer;
20 struct ELF_DebugInfo dbg = {eh, sh};
22 /* gdb support needs full paths */
23 #if !AROS_MODULES_DEBUG
24 /* First, go through the name, till end of the string */
25 while(*nameptr++);
26 /* Now, go back until either ":" or "/" is found */
27 while(nameptr > buffer && nameptr[-1] != ':' && nameptr[-1] != '/')
28 nameptr--;
29 #endif
30 RegisterModule(nameptr, hunks, DEBUG_ELF, &dbg);
32 FreeMem(buffer, 512);
34 // ?? CloseLibrary(DebugBase);