qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GDB get wrong debug infos on TI DSP architecture extension


From: Alex Bennée
Subject: Re: GDB get wrong debug infos on TI DSP architecture extension
Date: Wed, 27 May 2020 10:11:57 +0100
User-agent: mu4e 1.5.1; emacs 28.0.50

casmac <address@hidden> writes:

> Hi all,
> &nbsp;&nbsp; I am working on a TI DSP architecture extension for QEMU. Now, 
> we are adding GDB debugging features. 
> &nbsp;&nbsp; We have done the following, but not sure we are on the right 
> track :
> &nbsp;&nbsp; - add a xml description file in gdb-xml, without
> understanding the purpose of the file, why some architectures don't
> provide such xml file?

XML descriptions are an extension to the GDB protocol which avoids
having to have knowledge baked into GDB itself. The older well supported
architectures don't need to send them for their base config as GDB
already knows what they should have. However most extensions are
reported as XML.

You may well need to have logic in your target code which decides which
XML variant to send.

> &nbsp;&nbsp; - add ***_cpu_gdb_read_register(), ***_cpu_gdb_write_register();
> &nbsp;&nbsp; - added&nbsp; dsp_cpu_get_phys_page_attrs_debug(), but uncertain 
> about what to return
> &nbsp; &nbsp;&nbsp; dsp_cpu_get_phys_page_attrs_debug(CPUState *cs, vaddr 
> addr, MemTxAttrs *attrs) 
> &nbsp; &nbsp;&nbsp; {
> &nbsp; &nbsp; &nbsp; &nbsp; return addr &amp; TARGET_PAGE_MASK;&nbsp;&nbsp;
> &nbsp; &nbsp;&nbsp; }
> &nbsp;&nbsp; 
> &nbsp;&nbsp; We run QEMU with the these arguments
> &nbsp;&nbsp; qemu-system-dsp ... -kernel filename.out -S -s
> &nbsp;&nbsp; 
> &nbsp;&nbsp; It turns out that gdb reads incorrect register values,
> and complains : "warning: Target-supplied registers are not supported
> by the current architecture".

> <feature name="org.gnu.gdb.tic3x.core"&gt;

Does this match something in gdb?

-- 
Alex Bennée



reply via email to

[Prev in Thread] Current Thread [Next in Thread]