Re: debugging
- From: "Sheldon" <shejo284@xxxxxxxxx>
- Date: 30 Oct 2006 12:14:20 -0800
Bill Pursell skrev:
Sheldon wrote:
I would like to view the contents of structure as part of a debugging<snip>
routine.
To summerize: I am wondering if there is a way to view a structure like
in python: print list and to comfirm my suspicion about the memcpy to
the pointer.
Write a function to print the structure. eg:
void pretty_print (struct foo *f)
{
printf("a=%d\t b=%d\nc=%d\tc=%d\n", f->a, f->b, f->c, f->c);
}
Now, in your debugger, make a call to the function.
--
Bill Pursell
This would work if I had simple scalars in the structure but there are
arrays and strings as well as integers/floats. I just would like to
know what are the names of the variables in the structure and perhaps
the variable types.
/Sheldon
.
- Follow-Ups:
- Re: debugging
- From: Bill Pursell
- Re: debugging
- References:
- debugging
- From: Sheldon
- Re: debugging
- From: Bill Pursell
- debugging
- Prev by Date: Re: Include path question
- Next by Date: Re: assembly in future C standard
- Previous by thread: Re: debugging
- Next by thread: Re: debugging
- Index(es):