diff options
| author | kamil <kamil@NetBSD.org> | 2020-09-21 02:20:27 +0000 |
|---|---|---|
| committer | kamil <kamil@NetBSD.org> | 2020-09-21 02:20:27 +0000 |
| commit | cc2c140d7885aa0da1a15f4fd7f876689a2ad1ad (patch) | |
| tree | 3180497257f2433c8d42061b445ddca9e3040b64 /include | |
| parent | e7d9615198a8cff88a35bba8b318248d2783d9b0 (diff) | |
Refine the documentation of r_debug
Obtained from OpenBSD link.h r.1.15.
Diffstat (limited to 'include')
| -rw-r--r-- | include/link_elf.h | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/include/link_elf.h b/include/link_elf.h index 8da504af873..badebb182a2 100644 --- a/include/link_elf.h +++ b/include/link_elf.h @@ -1,4 +1,4 @@ -/* $NetBSD: link_elf.h,v 1.10 2010/10/16 10:27:06 skrll Exp $ */ +/* $NetBSD: link_elf.h,v 1.11 2020/09/21 02:20:27 kamil Exp $ */ #ifndef _LINK_ELF_H_ #define _LINK_ELF_H_ @@ -18,13 +18,27 @@ typedef struct link_map { } Link_map; /* - * This only exists for GDB. + * Debug rendezvous struct. Pointer to this is set up in the + * target code pointed by the DT_DEBUG tag. If it is + * defined. */ struct r_debug { - int r_version; /* not used */ + int r_version; /* protocol version */ struct link_map *r_map; /* list of loaded images */ + + /* + * This is the address of a function internal to the run-time linker, + * that will always be called when the linker begins to map in a + * library or unmap it, and again when the mapping change is complete. + * The debugger can set a breakpoint at this address if it wants to + * notice shared object mapping changes. + */ void (*r_brk)(void); /* pointer to break point */ enum { + /* + * This state value describes the mapping change taking place + * when the `r_brk' address is called. + */ RT_CONSISTENT, /* things are stable */ RT_ADD, /* adding a shared library */ RT_DELETE /* removing a shared library */ |
