Detect uninitialized memory in gdb
Andy Fan via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAKU4AWr_WrshnSz6SYwEFXKtLZS4azj7b-wCzrZOnrRK2EJvAQ@mail.gmail.com> |
Greetings.
Suppose I have the following codes:
struct X { ... };
void g(struct X *x_p);
void f()
{
struct X x_var;
g(&x_var);
}
In the function of g, I want to check the data where x_p point to,
however it is possible that it is not initialized like above code. So
do we have a way to detect that the memory x_p point to is not
initialized or not in gdb?
Best Regards
Andy Fan