From: Max Filippov <jcmvbkbc@gmail.com>
To: Luis Machado <lgustavo@codesourcery.com>
Cc: gdb-patches@sourceware.org, Maxim Grigoriev <maxim2405@gmail.com>,
Woody LaRue <larue@cadence.com>,
Marc Gauthier <marc@cadence.com>
Subject: Re: [PATCH 1/3] gdb: xtensa: initialize isa in call0_ret
Date: Tue, 14 Feb 2017 09:46:00 -0000 [thread overview]
Message-ID: <CAMo8BfLm-e6bpoyEuxWF--GeLO27VG0hfAMytnQUwj9vEbYn4A@mail.gmail.com> (raw)
In-Reply-To: <771fb557-5364-2844-43c5-cec009d75e53@codesourcery.com>
On Mon, Feb 13, 2017 at 10:32 AM, Luis Machado
<lgustavo@codesourcery.com> wrote:
> On 01/18/2017 05:50 PM, Max Filippov wrote:
>>
>> This fixes segfault in native gdb because isa is not initialized at the
>> point of call to xtensa_isa_maxlength.
>>
>> 2017-01-18 Max Filippov <jcmvbkbc@gmail.com>
>> gdb/
>
>
>
> Drop gdb/
>
>> diff --git a/gdb/xtensa-tdep.c b/gdb/xtensa-tdep.c
>> index 978b13a..797e728 100644
>> --- a/gdb/xtensa-tdep.c
>> +++ b/gdb/xtensa-tdep.c
>> @@ -2027,6 +2027,8 @@ call0_ret (CORE_ADDR start_pc, CORE_ADDR finish_pc)
>> const char *opcname;
>> int found_ret = 0;
>>
>> + if (!xtensa_default_isa)
>> + xtensa_default_isa = xtensa_isa_init (0, 0);
>> isa = xtensa_default_isa;
>> gdb_assert (XTENSA_ISA_BSZ >= xtensa_isa_maxlength (isa));
>> ins = xtensa_insnbuf_alloc (isa);
>>
>
> I see a couple other uses of this construct for checking if a default isa is
> set or not. How about moving this check to a function that takes care of
> setting the default isa and returns this information to assign to "isa"?
Ok, let me look at it.
--
Thanks.
-- Max
next prev parent reply other threads:[~2017-02-14 9:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 23:51 [PATCH 0/3] xtensa: support call0 ABI native linux gdb and gdbserver Max Filippov
2017-01-18 23:51 ` [PATCH 1/3] gdb: xtensa: initialize isa in call0_ret Max Filippov
2017-02-13 18:33 ` Luis Machado
2017-02-14 9:46 ` Max Filippov [this message]
2017-01-18 23:51 ` [PATCH 2/3] gdb: xtensa-linux: add call0 support Max Filippov
2017-02-13 18:37 ` Luis Machado
2017-01-18 23:51 ` [PATCH 3/3] gdbserver: xtensa: " Max Filippov
2017-02-13 18:43 ` Luis Machado
2017-02-14 10:04 ` Max Filippov
2017-01-26 19:11 ` [PATCH 0/3] xtensa: support call0 ABI native linux gdb and gdbserver Max Filippov
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=CAMo8BfLm-e6bpoyEuxWF--GeLO27VG0hfAMytnQUwj9vEbYn4A@mail.gmail.com \
--to=jcmvbkbc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=larue@cadence.com \
--cc=lgustavo@codesourcery.com \
--cc=marc@cadence.com \
--cc=maxim2405@gmail.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).