Skip to content

Commit 7b9e768

Browse files
authored
i#4856: Add Doxygen links for instr_t (#7700)
This PR adds explicit `#` Doxygen links for `instr_t` in various header files, as discussed in issue #4856. Fixes #4856
1 parent 1f424e5 commit 7b9e768

File tree

17 files changed

+963
-959
lines changed

17 files changed

+963
-959
lines changed

clients/drcachesim/drpt2trace/pt2ir.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class pt2ir_t {
358358
/**
359359
* The convert function performs two processes: (1) decode the PT raw trace into
360360
* libipt's IR format pt_insn; (2) convert pt_insn into the DynamoRIO's IR format
361-
* instr_t and append it to ilist inside the drir object.
361+
* #instr_t and append it to ilist inside the drir object.
362362
* @param pt_data The PT raw trace.
363363
* @param pt_data_size The size of PT raw trace.
364364
* @param drir The drir object.

clients/drcachesim/tracer/raw2trace_shared.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ print_module_data_fields(char *dst, size_t max_len, const void *custom_data,
484484

485485
/**
486486
* Subclasses module_mapper_t and replaces the module loading with a buffer
487-
* of encoded instr_t. Useful for tests where we want to mock the module
487+
* of encoded #instr_t. Useful for tests where we want to mock the module
488488
* files with an in-memory buffer of instrs.
489489
*/
490490
class test_module_mapper_t : public module_mapper_t {

core/ir/aarch64/instr_create_api.h

Lines changed: 253 additions & 252 deletions
Large diffs are not rendered by default.

core/ir/arm/instr_create_api.h

Lines changed: 286 additions & 286 deletions
Large diffs are not rendered by default.

core/ir/arm/opcode_api.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
* 5) instr_create macros
5454
* 6) suite/tests/api/ir* tests
5555
*/
56-
/** Opcode constants for use in the instr_t data structure. */
56+
/** Opcode constants for use in the #instr_t data structure. */
5757
enum {
5858
/* 0 */ OP_INVALID,
5959
/* NULL, */ /**< INVALID opcode */

core/ir/decode_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ DR_API
6565
* (xref instr_get_raw_bits()).
6666
* Assumes that \p instr is already initialized, but uses the x86/x64 mode
6767
* for the thread \p dcontext rather than that set in instr.
68-
* If caller is re-using same instr_t struct over multiple decodings,
68+
* If caller is re-using same #instr_t struct over multiple decodings,
6969
* caller should call instr_reset() or instr_reuse().
7070
* Returns the address of the next byte after the decoded instruction.
7171
* Returns NULL on decoding an invalid instr and sets opcode to OP_INVALID.
@@ -88,7 +88,7 @@ DR_API
8888
* all filled in.
8989
* Assumes that \p instr is already initialized, but uses the x86/x64 mode
9090
* for the thread \p dcontext rather than that set in instr.
91-
* If caller is re-using same instr_t struct over multiple decodings,
91+
* If caller is re-using same #instr_t struct over multiple decodings,
9292
* caller should call instr_reset() or instr_reuse().
9393
* Returns the address of the next byte after the decoded instruction
9494
* copy at \p copy_pc.

core/ir/encode_api.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,8 @@ DR_API
212212
* Encodes \p instr into the memory at \p pc.
213213
* Uses the x86/x64 mode stored in instr, not the mode of the current thread.
214214
* Returns the pc after the encoded instr, or NULL if the encoding failed.
215-
* If instr is a cti with an instr_t target, the offset fields of instr and
216-
* of the target must be set with the respective offsets of each instr_t!
215+
* If instr is a cti with an #instr_t target, the offset fields of instr and
216+
* of the target must be set with the respective offsets of each #instr_t!
217217
* (instrlist_encode does this automatically, if the target is in the list).
218218
* x86 instructions can occupy up to 17 bytes, so the caller should ensure
219219
* the target location has enough room to avoid overflow.
@@ -234,8 +234,8 @@ DR_API
234234
*
235235
* Uses the x86/x64 mode stored in instr, not the mode of the current thread.
236236
* Returns the pc after the encoded instr, or NULL if the encoding failed.
237-
* If instr is a cti with an instr_t target, the offset fields of instr and
238-
* of the target must be set with the respective offsets of each instr_t!
237+
* If instr is a cti with an #instr_t target, the offset fields of instr and
238+
* of the target must be set with the respective offsets of each #instr_t!
239239
* (instrlist_encode does this automatically, if the target is in the list).
240240
* x86 instructions can occupy up to 17 bytes, so the caller should ensure
241241
* the target location has enough room to avoid overflow.
@@ -253,10 +253,10 @@ DR_API
253253
* at \p pc. Returns the pc after all of the encodings, or NULL if any one
254254
* of the encodings failed.
255255
* Uses the x86/x64 mode stored in each instr, not the mode of the current thread.
256-
* In order for instr_t operands to be encoded properly,
256+
* In order for #instr_t operands to be encoded properly,
257257
* \p has_instr_jmp_targets must be true. If \p has_instr_jmp_targets is true,
258-
* the offset field of each instr_t in ilist will be overwritten, and if any
259-
* instr_t targets are not in \p ilist, they must have their offset fields set with
258+
* the offset field of each #instr_t in ilist will be overwritten, and if any
259+
* #instr_t targets are not in \p ilist, they must have their offset fields set with
260260
* their offsets relative to pc.
261261
* x86 instructions can occupy up to 17 bytes each, so the caller should ensure
262262
* the target location has enough room to avoid overflow.
@@ -278,10 +278,10 @@ DR_API
278278
*
279279
* Uses the x86/x64 mode stored in each instr, not the mode of the current thread.
280280
*
281-
* In order for instr_t operands to be encoded properly,
281+
* In order for #instr_t operands to be encoded properly,
282282
* \p has_instr_jmp_targets must be true. If \p has_instr_jmp_targets is true,
283-
* the offset field of each instr_t in ilist will be overwritten, and if any
284-
* instr_t targets are not in \p ilist, they must have their offset fields set with
283+
* the offset field of each #instr_t in ilist will be overwritten, and if any
284+
* #instr_t targets are not in \p ilist, they must have their offset fields set with
285285
* their offsets relative to pc.
286286
*
287287
* If \p max_pc is non-NULL, computes the total size required to encode the

core/ir/instr.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ instr_get_translation(instr_t *instr);
428428
DR_UNS_API
429429
/**
430430
* Brings all instrs in ilist up to the decode_cti level, and
431-
* hooks up intra-ilist cti targets to use instr_t targets, by
431+
* hooks up intra-ilist cti targets to use #instr_t targets, by
432432
* matching pc targets to each instruction's raw bits.
433433
*
434434
* decode_cti decodes only enough of instr to determine
@@ -602,31 +602,31 @@ instr_create_nbyte_nop(dcontext_t *dcontext, uint num_bytes, bool raw);
602602

603603
DR_UNS_API
604604
/**
605-
* Convenience routine that returns an initialized instr_t with invalid operands
605+
* Convenience routine that returns an initialized #instr_t with invalid operands
606606
* and allocated raw bits with 1 byte (byte).
607607
*/
608608
instr_t *
609609
instr_create_raw_1byte(dcontext_t *dcontext, byte byte);
610610

611611
DR_UNS_API
612612
/**
613-
* Convenience routine that returns an initialized instr_t with invalid operands
613+
* Convenience routine that returns an initialized #instr_t with invalid operands
614614
* and allocated raw bits with 2 bytes (byte1, byte2).
615615
*/
616616
instr_t *
617617
instr_create_raw_2bytes(dcontext_t *dcontext, byte byte1, byte byte2);
618618

619619
DR_UNS_API
620620
/**
621-
* Convenience routine that returns an initialized instr_t with invalid operands
621+
* Convenience routine that returns an initialized #instr_t with invalid operands
622622
* and allocated raw bits with 3 bytes (byte1, byte2, byte3).
623623
*/
624624
instr_t *
625625
instr_create_raw_3bytes(dcontext_t *dcontext, byte byte1, byte byte2, byte byte3);
626626

627627
DR_UNS_API
628628
/**
629-
* Convenience routine that returns an initialized instr_t with invalid operands
629+
* Convenience routine that returns an initialized #instr_t with invalid operands
630630
* and allocated raw bits with 4 bytes (byte1, byte2, byte3, byte4).
631631
*/
632632
instr_t *
@@ -635,7 +635,7 @@ instr_create_raw_4bytes(dcontext_t *dcontext, byte byte1, byte byte2, byte byte3
635635

636636
DR_UNS_API
637637
/**
638-
* Convenience routine that returns an initialized instr_t with invalid operands
638+
* Convenience routine that returns an initialized #instr_t with invalid operands
639639
* and allocated raw bits with 5 bytes (byte1, byte2, byte3, byte4, byte5).
640640
*/
641641
instr_t *
@@ -644,7 +644,7 @@ instr_create_raw_5bytes(dcontext_t *dcontext, byte byte1, byte byte2, byte byte3
644644

645645
DR_UNS_API
646646
/**
647-
* Convenience routine that returns an initialized instr_t with invalid operands
647+
* Convenience routine that returns an initialized #instr_t with invalid operands
648648
* and allocated raw bits with 6 bytes (byte1, byte2, byte3, byte4, byte5, byte6).
649649
*/
650650
instr_t *
@@ -653,7 +653,7 @@ instr_create_raw_6bytes(dcontext_t *dcontext, byte byte1, byte byte2, byte byte3
653653

654654
DR_UNS_API
655655
/**
656-
* Convenience routine that returns an initialized instr_t with invalid operands
656+
* Convenience routine that returns an initialized #instr_t with invalid operands
657657
* and allocated raw bits with 7 bytes (byte1, byte2, byte3, byte4, byte5, byte6,
658658
* byte7).
659659
*/
@@ -663,7 +663,7 @@ instr_create_raw_7bytes(dcontext_t *dcontext, byte byte1, byte byte2, byte byte3
663663

664664
DR_UNS_API
665665
/**
666-
* Convenience routine that returns an initialized instr_t with invalid operands
666+
* Convenience routine that returns an initialized #instr_t with invalid operands
667667
* and allocated raw bits with 7 bytes (byte1, byte2, byte3, byte4, byte5, byte6,
668668
* byte7, byte8).
669669
*/

0 commit comments

Comments
 (0)