1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//! Get section/segment relocation offsets from the target.
//!
//! For some targets, sections may be relocated from their base address. As
//! a result, the stub may need to tell GDB the final section addresses
//! to ensure that debug symbols are resolved correctly after relocation.
//!
//! _Note:_ This extension corresponds to the `qOffsets` command, which is
//! limited to reporting the offsets for code, data and bss, and is
//! generally considered a legacy feature.
//!
//! For System-V architectures GDB may use the `qXfer:libraries-svr4:read`
//! command to try to learn about loaded libraries and this can be implemented
//! with the [`LibrariesSvr4`
//! trait](crate::target::ext::libraries::LibrariesSvr4). Note that not all
//! targets may query this and it may not be applicable in all situations
//! either.
//!
//! For targets where library offsets are maintained externally (e.g. Windows)
//! you should consider implementing the more flexible `qXfer:library:read`.
//! See issue [#20](https://github.com/daniel5151/gdbstub/issues/20) for more
//! info.
//!
//! For System-V architectures GDB is capable of extracting library offsets
//! from memory if it knows the base address of the dynamic linker. The base
//! address can be specified by either implementing this command or by including
//! a `AT_BASE` entry in the response to the more modern `qXfer:auxv:read`
//! command. See issue [#20](https://github.com/daniel5151/gdbstub/issues/20)
//! for more info.
use crateArch;
use crateTarget;
/// Describes the offset the target loaded the image sections at, so the target
/// can notify GDB that it needs to adjust the addresses of symbols.
///
/// GDB supports either section offsets, or segment addresses.
/// Target Extension - Get section/segment relocation offsets from the target.
///
/// Corresponds to the `qOffset` command. See the [section_offset module
/// documentation](index.html).
define_ext!;