1 #include <aros/config.h>
2 #include <libraries/debug.h>
3 #include <proto/debug.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
)
14 char *buffer
= AllocMem(512, MEMF_ANY
);
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 */
26 /* Now, go back until either ":" or "/" is found */
27 while(nameptr
> buffer
&& nameptr
[-1] != ':' && nameptr
[-1] != '/')
30 RegisterModule(nameptr
, hunks
, DEBUG_ELF
, &dbg
);
34 CloseLibrary(DebugBase
);