c - What can I do to track this bug down? -


i have bug char pointer turning out null. i've been on gdb program, watching read/write @ memory address, , stepping through instructions, far bug stumps me. i've ran valgrind , thing coming read @ crash (strcmp). else can track down?

you can try watchpoint. watch expression , when value of expression changes, gdb stop execution.

you can watch variable:

watch charptr 

this break every time charptr changes. if wanted know when changes non-null null (or vice versa), can use:

watch charptr == 0 

Comments

Popular posts from this blog

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

c++ - Convert big endian to little endian when reading from a binary file -