qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: casmac <1482995675@qq.com>
Cc: qemu-devel@nongnu.org
Subject: Re: GDB get wrong debug infos on TI DSP architecture extension
Date: Wed, 27 May 2020 10:11:57 +0100	[thread overview]
Message-ID: <87a71t7ndu.fsf@linaro.org> (raw)
In-Reply-To: <tencent_86D9DB902C46CBAC4F3A6FD5B4CDA93B7506@qq.com>


casmac <1482995675@qq.com> 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


      parent reply	other threads:[~2020-05-27  9:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27  6:48 GDB get wrong debug infos on TI DSP architecture extension casmac
2020-05-27  7:19 ` Philippe Mathieu-Daudé
2020-05-27 21:41   ` Taylor Simpson
2020-05-29  7:27     ` casmac
2020-05-29 15:19       ` Taylor Simpson
2020-05-28  1:16   ` casmac
2020-05-28  8:34     ` Alex Bennée
2020-05-28  9:49       ` =?gb18030?B?u9i4tKO6IEdEQiBnZXQgd3JvbmcgZGVidWcgaW5mb3Mgb24gVEkgRFNQIGFyY2hpdGVjdHVyZSBleHRlbnNpb24=?= =?gb18030?B?eGlhb2xlaQ==?=
2020-05-27  9:11 ` Alex Bennée [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a71t7ndu.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=1482995675@qq.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).