Pedro Alves | 1 Jan 2009 23:09

Re: PR9681 - gdb lets you set watchpoints on nonexistent struct members

On Wednesday 31 December 2008 19:19:27, Daniel Jacobowitz wrote:
> Very nice.  Looks OK to me.

Thanks, I've checked it in.  Peter, thanks for the report.

--

-- 
Pedro Alves

Nick Clifton | 2 Jan 2009 17:18
Picon
Favicon

Re: [RFA:] CGEN sim operation extension fix; frv adjustment needed.

Hi Hans-Peter,

> src/cpu:
> 	* frv.cpu (mabshs): Explicitly sign-extend arguments of abs to DI.
> 	(DI-ext-HI, DI-ext-UHI, DI-ext-DI): New pmacros.
> 	(media-arith-sat-semantics): Explicitly sign- or zero-extend
> 	arguments of "operation" to DI using "mode" and the new pmacros.

Approved - please apply.

Cheers
   Nick

Thiago Jung Bauermann | 3 Jan 2009 03:24
Picon

[RFC][python] Fixes and improvements to gdb.Value.

Hi,

This patch has fixes and improvements made to the value python bindings
that have been made in the python branch since this code has been
committed to CVS. Ok?
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center

gdb/
2009-01-03  Tom Tromey  <tromey <at> redhat.com>
	    Thiago Jung Bauermann  <bauerman <at> br.ibm.com>

	* python/python-internal.h (gdbpy_get_value_from_history): Rename
	prototype to gdbpy_history.
	(gdbpy_is_string): Declare.
	(python_string_to_host_string): Declare.
	* python/python-utils.c (gdbpy_is_string): New function.
	(unicode_to_encoded_string): New function.
	(unicode_to_target_string): Use it.
	(python_string_to_host_string): New function.
	* python/python-value.c (valpy_address): New function.
	(valpy_getitem): Convert field name to
	host string.  Handle array accesses.
	(enum valpy_opcode) <VALPY_LSH, VALPY_RSH, VALPY_BITAND,
	VALPY_BITXOR, VALPY_BITOR>: New constants.
	(valpy_binop): Update.
	(valpy_invert): New function.
	(valpy_lsh): Likewise.
(Continue reading)

Thiago Jung Bauermann | 3 Jan 2009 03:26
Picon

Re: [RFA] Add la_getstr member to language_defn

El lun, 24-11-2008 a las 20:09 -0200, Thiago Jung Bauermann escribió: 
> Ok, this version of the patch has the following changes from my last
> submission:
> 
> - changed read_string comment to use the wording above;
> - renamed la_getstr, c_getstr and default_getstr to la_get_string, 
>   c_get_string and default_get_string;
> - added const char **encoding argument to {la,c,default}_get_string,
>   so that the charset of the string can be returned to the caller;
> - fixed c_get_string to use UINT_MAX for fetchlimit instead of -1;
> - fixed c_get_string to allocate 1 byte when LEN is 0.
> 
> WDYT?

The patch doesn't apply anymore. This is the same patch, refreshed
against HEAD as of Dec 28th. Ok?
--

-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center

2009-01-03  Thiago Jung Bauermann  <bauerman <at> br.ibm.com>

	* language.h (language_dfn): Add la_get_string member.
	(LA_GET_STRING): New macro.
	(default_get_string): New prototype.
	* language.c (default_get_string): New function.
	(unknown_language_defn, auto_language_defn, local_language_defn): Use
	default_get_string for la_get_string.
	* c-lang.c (c_get_string): New function.
(Continue reading)

Thiago Jung Bauermann | 3 Jan 2009 03:27
Picon

[RFA][python] Add gdb.Value.string method.

Hi,

This patch adds a method to the Value python class which returns the
value as a Python Unicode string. It depends on the patch I just posted
in the "Add la_getstr member to language_defn", and assumes that the
"Fixes and improvements to gdb.Value" patch has been applied. Ok?
-- 
[]'s
Thiago Jung Bauermann
IBM Linux Technology Center

gdb/
2009-01-03  Thiago Jung Bauermann  <bauerman <at> br.ibm.com>
	    Tom Tromey  <tromey <at> redhat.com>

	* python/python-utils.c (target_string_to_unicode): New function.
	* python/python-internal.h (target_string_to_unicode): New prototype.
	* python/python-value.c (valpy_string): New function.
	(value_object_methods): Add `string' entry.

gdb/doc/
2009-01-03  Tom Tromey  <tromey <at> redhat.com>

	* gdb.texinfo (Values From Inferior): Document Value.string.

diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 030d4b3..3b1cd91 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
 <at>  <at>  -18202,6 +18202,31  <at>  <at>  The result  <at> code{bar} will be a  <at> code{gdb.Value} object holding the
(Continue reading)

Joel Brobecker | 3 Jan 2009 07:06
Favicon

[commit] Start of New Year Procedure applied...

Hello,

Just a quick note to let everyone know that I applied the Start of New
Year procedure as documented in our internals manual:
  - 2009 added to the copyright notices
  - GDB now prints 2009 as its copyright year
  - ChangeLog has been rotated (with associated fnchange.lst update)

The update of the copyright notices was performed by a script
using emacs. I reviewed about 20% of the changes before giving up,
and everything seemed to be fine. Let us know if you see something
wrong or some files that we missed.

2009-01-03  Joel Brobecker  <brobecker <at> adacore.com>

        Updated copyright notices for most files.

2009-01-03  Joel Brobecker  <brobecker <at> adacore.com>

        * top.c (print_gdb_version): Update copyright year.

2009-01-03  Joel Brobecker  <brobecker <at> adacore.com>

        * config/djgpp/fnchange.lst: Add entry for ChangeLog-2008.

--

-- 
Joel

Eli Zaretskii | 3 Jan 2009 10:41
Picon

Re: [RFC][python] Fixes and improvements to gdb.Value.

> From: Thiago Jung Bauermann <bauerman <at> br.ibm.com>
> Date: Sat, 03 Jan 2009 00:24:59 -0200
> 
> This patch has fixes and improvements made to the value python bindings
> that have been made in the python branch since this code has been
> committed to CVS. Ok?

Thanks.

> gdb/doc/
> 2009-01-03  Tom Tromey  <tromey <at> redhat.com>
> 
> 	* gdb.texinfo (Basic Python): Document gdb.history.

This part is approved, but I have a few comments:

> + <at> findex gdb.history

The text below this does not mention "gdb.history" at all.  Should it?
I could imagine a reader who gets here by following the "gdb.history"
index entry, and is then puzzled by not finding that text anywhere.

> +If  <at> var{number} is less than or equal to zero, then  <at> value{GDBN} will
> +take the absolute value of  <at> var{number} and count backward from the
> +last element to find the value to return.

For clarity, I'd separate the zero case and the negative case.  First,
"is less than or equal to zero" is a mouthful that would be eliminated
then; you could simply say "negative".  And second, "count zero
elements backward" is an abstraction that is a better avoided.
(Continue reading)

Hans-Peter Nilsson | 3 Jan 2009 18:52
Picon
Favicon

Committed: fix size of CRIS special register 2

Had I used the name (PID), I would have trigged that this'd to
be the wrong size.  For reference,
<http://www.axis.com/files/manuals/etrax_fs_des_ref-070821.pdf>,
table 2.2.

Committed.

cpu:
	* cris.cpu (cris-implemented-writable-specregs-v32): Correct size
	of number 2, PID.

src/sim:
	* cris/semcrisv32f-switch.c: Regenerate.

src/sim/testsuite:
	* sim/cris/asm/pid1.ms: New test.

Index: cris.cpu
===================================================================
RCS file: /cvs/src/src/cpu/cris.cpu,v
retrieving revision 1.7
diff -p -u -r1.7 cris.cpu
--- cris.cpu	22 Oct 2007 16:04:43 -0000	1.7
+++ cris.cpu	3 Jan 2009 17:40:02 -0000
 <at>  <at>  -439,7 +439,7  <at>  <at> 

 (define-pmacro (cris-implemented-writable-specregs-v32)
   "Special writable registers in v32 and their sizes"
-  ((QI 2) (QI 3)
+  ((SI 2) (QI 3)
(Continue reading)

Jakob Engblom | 3 Jan 2009 19:08
Favicon

RE: reverse for GDB/MI


> Hi,
> 
> It was pointed out to me that people who have been doing reversible
> debug for a while seems to
> have specific commands for reverse debugging and they do have a command
> for "go to time point P".
> For example http://www.undo-software.com/undodb_man.html:
> 
> bgoton <number>
> Move forwards or backwards to the specified time, in simulated
> nanoseconds.
> bgoton +<number> | -<number>
> Step forward/backward the specified number of simulated nanoseconds.

Simics has it to, in some different ways:

skip-to <bookmark> 
reverse n time units
continue n time units

I think this is a good example of the kind of new commands and abilities that
come with having a reverse ability in the first place, like Marc said. 

And as the later discussion evolved, it would be jolly nice to have an idea of
time in gdb. I think that is needed anyway to handle multicore, multiprocessor,
and multithreaded debug: when things happen in disparate locations under the
control of a single debugger quickly gets very interesting...

Best regards,
(Continue reading)

Hans-Peter Nilsson | 3 Jan 2009 19:41
Picon
Favicon

Committed: add access syscall to sim/cris

The access syscall was used one way or another (perhaps it was
just in an error path) in hello-world with glibc-2.9 (eglibc).

I see it's also used in the gfortran testsuite, so this will
hopefully change a few FAILs with "Unimplemented syscall: 33
(0x3dfff...)" in the log to PASS for cris{,v32}-axis-linux-gnu
later on.

sim/testsuite:
	* sim/cris/c/access1.c: New test.
sim:
	* cris/traps.c (TARGET_SYS_access, TARGET_R_OK, TARGET_W_OK)
	(TARGET_X_OK, TARGET_F_OK): Define.
	(cris_break_13_handler) <case TARGET_SYS_access>: New case.

Index: sim/cris/c/access1.c
===================================================================
RCS file: sim/cris/c/access1.c
diff -N sim/cris/c/access1.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sim/cris/c/access1.c	3 Jan 2009 18:13:35 -0000
 <at>  <at>  -0,0 +1,16  <at>  <at> 
+/* Check access(2) trivially.  Newlib doesn't have it.
+#notarget: cris*-*-elf
+*/
+#include <unistd.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+int main (int argc, char **argv)
(Continue reading)


Gmane