This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

how to pass paramter to openocd or shell by gdb macro


hi all:
I try to use below macro in gdb for dumping memory

define test
    set $start = log_buf
    set $length = log_buf_len
    mon dump_image dmesg.bin $start $length
end

But the gdb told me the $start doesn't exist.
The symbols, log_buf and log_buf_len did have values.
Is there any other way to pass parameter in macro to openocd, low
level ice debug?

Appreciate your kind help in advance,

PS:below is my output:
(gdb) test
can't read "start": no such variable
(gdb) p/x log_buf
$3 = 0xc08516e0
(gdb) p/x log_buf_len
$4 = 0x20000
(gdb)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]