Change length of an array using gdb

I have a program with the following code, and I need to be able to either change the value of any or all of the strlen or to replace one or all with a temp array value. All values of the expression are arrays.

if (::strlen(tc_buf) + ::strlen(maxtime_buf) + ::strlen("\t") < sizeof(localBuf))
To store values into arbitrary places in memory, use the `{...}' construct to generate a value of specified type at a specified address (see section Expressions). For example, {int}0x83040 refers to memory location 0x83040 as an integer (which implies a certain size and representation in memory), and

set {int}0x83040 = 4

stores the value 4 into that memory location.

http://www.delorie.com/gnu/docs/gdb/gdb_118.html
Topic archived. No new replies allowed.