Kevin Buettner | 1 Mar 2012 01:12
Picon
Favicon

Re: [PATCH] [SH] Prologue skipping if there is none

On Wed, 29 Feb 2012 12:05:01 +0100
Thomas Schwinge <thomas <at> schwinge.name> wrote:

> As we already had figured out, it introduces the following nine
> regressions (PASS -> FAIL):
> 
>     FAIL: gdb.base/store.exp: continue to add_charest
>     FAIL: gdb.base/store.exp: continue to add_short
>     FAIL: gdb.base/store.exp: continue to add_int
>     FAIL: gdb.base/store.exp: continue to add_long
>     FAIL: gdb.base/store.exp: continue to add_longest
>     FAIL: gdb.base/structs.exp: advance to fun<n> for return; return 2 structs-td-tf
>     FAIL: gdb.base/structs.exp: advance to fun<n> for finish; return 2 structs-td-tf
>     FAIL: gdb.base/structs.exp: advance to fun<n> for return; return 2 structs-tf-td
>     FAIL: gdb.base/structs.exp: advance to fun<n> for finish; return 2 structs-tf-td

I could live with these if there were a significant number of progressions
elsewhere.

> As already reported, an additional regression for sh-linux-gnu:
> 
>      Running
/scratch/tschwing/FM_sh-linux-gnu/src/gdb-mainline/gdb/testsuite/gdb.threads/staticthreads.exp ...
>      PASS: gdb.threads/staticthreads.exp: successfully compiled posix threads test case
>      PASS: gdb.threads/staticthreads.exp: set print sevenbit-strings
>      PASS: gdb.threads/staticthreads.exp: break sem_post
>     -PASS: gdb.threads/staticthreads.exp: Continue to main's call of sem_post
>     +FAIL: gdb.threads/staticthreads.exp: Continue to main's call of sem_post (the program exited)
>      PASS: gdb.threads/staticthreads.exp: rerun to main
>      PASS: gdb.threads/staticthreads.exp: handle SIG32 nostop noprint pass
(Continue reading)

Kevin Buettner | 1 Mar 2012 01:34
Picon
Favicon

[RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist

The patch below fixes 119 failures for the default sh-elf multilib (using
sh-sim.)  I can post a list if there's interest in seeing them.

Comments?  Is there a better way to test for the existence of a register?

Kevin

	* sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
	unless it exists for this architecture.

Index: sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.239
diff -u -p -r1.239 sh-tdep.c
--- sh-tdep.c	27 Feb 2012 16:40:48 -0000	1.239
+++ sh-tdep.c	1 Mar 2012 00:31:31 -0000
 <at>  <at>  -2553,7 +2553,12  <at>  <at>  sh_frame_cache (struct frame_info *this_
   if (cache->pc != 0)
     {
       ULONGEST fpscr;
-      fpscr = get_frame_register_unsigned (this_frame, FPSCR_REGNUM);
+      const char *fpscr_name = gdbarch_register_name (gdbarch, FPSCR_REGNUM);
+
+      if (fpscr_name && fpscr_name[0])
+	fpscr = get_frame_register_unsigned (this_frame, FPSCR_REGNUM);
+      else
+	fpscr = 0;
       sh_analyze_prologue (gdbarch, cache->pc, current_pc, cache, fpscr);
     }
(Continue reading)

Joel Brobecker | 1 Mar 2012 02:33
Favicon

Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist

> Comments?  Is there a better way to test for the existence of a register?

Perhaps an idea... Apparently, this is a property of the arch, so
something relatively static. This is typically the type of information
the sh_gdbarch_init routine would save in the gdbarch_tdep structure.
You can create a new flag in that structure, and then set it at the
same time you register the register_name gdbarch hook.

> 	* sh-tdep.c (sh_frame_cache): Don't fetch the FPSCR register
> 	unless it exists for this architecture.

--

-- 
Joel

Joel Brobecker | 1 Mar 2012 03:02
Favicon

[commit] remove dead code in varobj.c:c_value_of_variable

This patch removes some dead code identified in:
http://www.sourceware.org/ml/gdb-patches/2012-01/msg00266.html

(and analysis confirmed by Tom).

gdb/ChangeLog:

        * varobj.c (c_value_of_variable): Remove dead code.

Tested on x86_64-linux.  Checked in.

---
 gdb/ChangeLog |    4 ++++
 gdb/varobj.c  |    5 -----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 621da5b..cb9eecb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
 <at>  <at>  -1,5 +1,9  <at>  <at> 
 2012-02-29  Joel Brobecker  <brobecker <at> adacore.com>

+	* varobj.c (c_value_of_variable): Remove dead code.
+
+2012-02-29  Joel Brobecker  <brobecker <at> adacore.com>
+
 	* ada-lex.p (processId): Do not modify already encoded IDs.
 	Update function documentation.

(Continue reading)

Joel Brobecker | 1 Mar 2012 03:43
Favicon

FYI: Import gnulib's latest update-copyright script...

... and update our copyright.py script to set environment variable
UPDATE_COPYRIGHT_USE_INTERVALS to '2' instead of '1'.  This tells
the script to collapse all years into one single interval.

This act on a discussion we had at the beginning of the year.
I can also run the script, and transform all the files now.
Or I could get it done at the start of next year, but it will be
combined with the addition of year 2013... I don't have a preference,
whatever is the least amount of pain for everyone.

gdb/ChangeLog:

        * gnulib/extra/update-copyright: Update to the latest from
        gnulib's git repository.
        * copyright.py: Set UPDATE_COPYRIGHT_USE_INTERVALS environment
        variable to 2 instead of 1.

Checked in.

---
 gdb/ChangeLog                     |    7 +++++++
 gdb/copyright.py                  |    7 +++++--
 gdb/gnulib/extra/update-copyright |   13 ++++++++++---
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index cb9eecb..2cc117e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
 <at>  <at>  -1,3 +1,10  <at>  <at> 
(Continue reading)

Joel Brobecker | 1 Mar 2012 03:43
Favicon

[commit] Do not set MULTILINE_COMMENT_PREFIXES before calling update-copyright

This was a local hack to work around a limitation in update-copyright.
But the limitation is now OBE, because the copyright statements should
now always fit on a single line, thanks to the new policy of using
one single year range in the copyright notice.

gdb/ChangeLog:

        * copyright.py (MULTILINE_COMMENT_PREFIXES): Delete.
        (update_files): Do not set MULTILINE_COMMENT_PREFIXES
        environment variable before calling update-copyright.

Checked in.

---
 gdb/ChangeLog    |    6 ++++++
 gdb/copyright.py |   12 ------------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2cc117e..6338c4c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
 <at>  <at>  -1,5 +1,11  <at>  <at> 
 2012-03-01  Joel Brobecker  <brobecker <at> adacore.com>

+	* copyright.py (MULTILINE_COMMENT_PREFIXES): Delete.
+	(update_files): Do not set MULTILINE_COMMENT_PREFIXES
+	environment variable before calling update-copyright.
+
+2012-03-01  Joel Brobecker  <brobecker <at> adacore.com>
(Continue reading)

Eli Zaretskii | 1 Mar 2012 04:57
Picon

Re: [RFA/NEWS] Document condition at end of catch exception/assert commands

> From: Joel Brobecker <brobecker <at> adacore.com>
> Cc: Joel Brobecker <brobecker <at> adacore.com>
> Date: Wed, 29 Feb 2012 15:34:13 -0800
> 
> This is the news entry promised at:
> http://www.sourceware.org/ml/gdb-patches/2012-02/msg00727.html
> 
> gdb/ChangeLog:
> 
>         * NEWS: Document the fact that one can provide a condition when
>         creating an Ada exception catchpoint.
> 
> OK to commit?

Yes, thanks.

Kevin Buettner | 1 Mar 2012 06:09
Picon
Favicon

Re: [RFC] sh-tdep.c: Don't fetch FPSCR register if it doesn't exist

On Wed, 29 Feb 2012 17:33:18 -0800
Joel Brobecker <brobecker <at> adacore.com> wrote:

> > Comments?  Is there a better way to test for the existence of a register?
> 
> Perhaps an idea... Apparently, this is a property of the arch, so
> something relatively static. This is typically the type of information
> the sh_gdbarch_init routine would save in the gdbarch_tdep structure.
> You can create a new flag in that structure, and then set it at the
> same time you register the register_name gdbarch hook.

I considered that approach.  It'll work, but seemed like more coding
than it was worth when I first wrote the patch.  But thinking about
it now, I don't find this to be a very compelling reason to code it
the way that I did.

That said, I'm not fond of the tdep flag idea, at least not in this
instance...

If we were to use a tdep flag, we must ensure that this flag is set
correctly for each architecture variant.  For sh, there are a bunch of
`register_name' and `register_type' implementations.  It seems like a
shame to have to add redundant knowledge about fpscr to the tdep
struct.

If we were to keep that knowledge together or somehow derive it from
knowledge we already had it'd be different.  But in order to determine
the correct value of this new flag, the most obvious course of action
is (for one of us) to examine the register names to see if fpscr is
present.  We'll have to transcribe that knowledge to the various cases
(Continue reading)

Thomas Schwinge | 1 Mar 2012 10:00
Gravatar

Re: [PATCH] [SH] Prologue skipping if there is none

Hi!

On Wed, 29 Feb 2012 12:05:01 +0100, I wrote:
> And, as already reported, there is this progression for sh-linux-gnu:
> 
>          -FAIL: gdb.base/gdb1250.exp: setting breakpoint at abort
>          +PASS: gdb.base/gdb1250.exp: backtrace from abort
> 
> The PLT stub for abort happens to be the last one in the .plt section,
> and (I suppose) your more advanced limit_pc/func_end mechanism (instead
> of hard-coding 28 instructions) helps to avoid hitting the
> end-of-.plt-section border.  (The question is whether it really makes
> sense to go looking for a prologue in a PLT stub, but that's what GDB is
> currently doing, and it should be without harm.)

Here is a patch to fix this ``break abort'' FAIL; no regressions for
sh-linux-gnu and sh-elf.

	* sh-tdep.c (sh_skip_prologue): Provide an upper limit on the function
	prologue to sh_analyze_prologue.
	(sh_analyze_prologue): Make better use of such an upper limit, and
	generally be more cautious about accessing memory.

Index: gdb/sh-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh-tdep.c,v
retrieving revision 1.239
diff -u -p -r1.239 sh-tdep.c
--- gdb/sh-tdep.c	27 Feb 2012 16:40:48 -0000	1.239
+++ gdb/sh-tdep.c	1 Mar 2012 08:48:23 -0000
(Continue reading)

Thomas Schwinge | 1 Mar 2012 10:03
Gravatar

Re: [PATCH] [SH] Prologue skipping if there is none

Hi Kevin!

On Wed, 29 Feb 2012 17:12:47 -0700, Kevin Buettner <kevinb <at> redhat.com> wrote:
> On Wed, 29 Feb 2012 12:05:01 +0100
> Thomas Schwinge <thomas <at> schwinge.name> wrote:
> > As for the other advancements that you reported, do you have any
> > additional patches in your tree; see the questions in my 2012-02-21
> > email, Message-ID: <8762f09stp.fsf <at> schwinge.name>.
> 
> It turns out that I do.  It's unrelated to prologue analysis.  I'll
> post it separately in a few minutes.  (I'll CC you on it.)
> 
> It's a small patch that I thought I had removed from my tree.  Sorry
> about the noise caused by that patch.

Ah good, and no problem -- so at least we know there's no magic involved
causing the differences betweeen our two's testing setups.

> Thanks for all of your work on this matter.

Thanks to your for helping, reviewing, etc.!

Grüße,
 Thomas

Gmane