Skip to content

Commit dbbb444

Browse files
pm215Michael Tokarev
authored andcommitted
hw/core/cpu: gdb_arch_name string should not be freed
The documentation for the CPUClass::gdb_arch_name method claims that the returned string should be freed with g_free(). This is not correct: in commit a650683 we changed this method to instead return a simple constant string, but forgot to update the documentation. Make the documentation match the new semantics. Fixes: a650683 ("hw/core/cpu: Return static value with gdb_arch_name()") Signed-off-by: Peter Maydell <[email protected]> Reviewed-by: Alex Bennée <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> (cherry picked from commit 56a9f0d) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 94da90b commit dbbb444

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

include/hw/core/cpu.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ struct SysemuCPUOps;
135135
* @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop
136136
* before the insn which triggers a watchpoint rather than after it.
137137
* @gdb_arch_name: Optional callback that returns the architecture name known
138-
* to GDB. The caller must free the returned string with g_free.
138+
* to GDB. The returned value is expected to be a simple constant string:
139+
* the caller will not g_free() it.
139140
* @disas_set_info: Setup architecture specific components of disassembly info
140141
* @adjust_watchpoint_address: Perform a target-specific adjustment to an
141142
* address before attempting to match it against watchpoints.

0 commit comments

Comments
 (0)