This is the mail archive of the gdb@sources.redhat.com 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]

Re: Program terminated with SIGSEGV when trying to print an array element


On Wed, Jun 08, 2005 at 02:52:20PM +0800, Wu Zhou wrote:
> Sure.  But now I am having difficulty in one problem: given an struct value 
> with the type being TYPE_CODE_PTR, how to get the value of the array (or 
> string or whatever) it refer to?  We need to know this to go on with the 
> following evaluation.  I had thought that function "value_from_pointer" 
> will do this, but it turn out to be false.  Anyone could help on this? 

Usually, value_ind.  Do you have a pointer to a TYPE_CODE_ARRAY, or has
the array decayed into a pointer (like in C)?

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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