dje | 10 Aug 2012 06:14
Picon
Favicon

Re: [RFA, doc RFA] Implement $_memeq, $_streq, $_strlen

Here's, hopefully, my final revision.

Ok to check in?

2012-08-09  Doug Evans  <dje <at> google.com>

	Add $_memeq, $_regex, $_streq, $_strlen convenience functions.
	* NEWS: Document them.
	* data-directory/Makefile.in (PYTHON_FILES): Add function/__init__.py,
	function/strfns.py.
	* python/py-type.c (typy_array_1): New function.
	(typy_array): Call it.
	(typy_vector): New function.
	(type_object_methods): Add "vector".
	* python/lib/gdb/function/__init__.py: New file.
	* python/lib/gdb/function/strfns.py: New file.

	doc/
	* gdb.texinfo (Convenience Funs): New node.
	(Types In Python): Document Type.vector.

	testsuite/
	* gdb.python/py-strfns.c: New file.
	* gdb.python/py-strfns.exp: New file.
	* gdb.python/py-type.exp (test_fields): Add vector tests.

Index: NEWS
===================================================================
RCS file: /cvs/src/src/gdb/NEWS,v
retrieving revision 1.539
(Continue reading)

Eli Zaretskii | 10 Aug 2012 08:38
Picon

Re: [RFA, doc RFA] Implement $_memeq, $_streq, $_strlen

> Date: Thu, 9 Aug 2012 21:14:24 -0700
> Cc: gdb-patches <at> sourceware.org
> From: dje <at> google.com
> 
> Here's, hopefully, my final revision.
> 
> Ok to check in?

Yes, with this final nit:

> +These functions require GDB to be configured with  <at> code{Python} support.
                           ^^^
 <at> value{GDBN}

Thanks.

Jan Kratochvil | 11 Aug 2012 10:08
Picon
Favicon

Regression for gdb.base/default.exp: show convenience [Re: [RFA, doc RFA] Implement $_memeq, $_streq, $_strlen]

On Fri, 10 Aug 2012 06:14:24 +0200, dje <at> google.com wrote:
> Ok to check in?

96e5de1146522ad853b4cb51ff58fdad6ad79f7d is the first bad commit
commit 96e5de1146522ad853b4cb51ff58fdad6ad79f7d
Author: Doug Evans <dje <at> google.com>
Date:   Fri Aug 10 20:25:50 2012 +0000

    	Add $_memeq, $_regex, $_streq, $_strlen convenience functions.

-PASS: gdb.base/default.exp: show convenience
+FAIL: gdb.base/default.exp: show convenience ($_probe_arg0 = <error: No frame selected> not found)

It happens on all OSes/archs but only without --without-python.

Regards,
Jan

dje | 11 Aug 2012 19:46
Picon
Favicon

Re: Regression for gdb.base/default.exp: show convenience [Re: [RFA, doc RFA] Implement $_memeq, $_streq, $_strlen]

Jan Kratochvil writes:
 > On Fri, 10 Aug 2012 06:14:24 +0200, dje <at> google.com wrote:
 > > Ok to check in?
 > 
 > 96e5de1146522ad853b4cb51ff58fdad6ad79f7d is the first bad commit
 > commit 96e5de1146522ad853b4cb51ff58fdad6ad79f7d
 > Author: Doug Evans <dje <at> google.com>
 > Date:   Fri Aug 10 20:25:50 2012 +0000
 > 
 >     	Add $_memeq, $_regex, $_streq, $_strlen convenience functions.
 > 
 > -PASS: gdb.base/default.exp: show convenience
 > +FAIL: gdb.base/default.exp: show convenience ($_probe_arg0 = <error: No frame selected> not found)
 > 
 > It happens on all OSes/archs but only without --without-python.

Blech.  I'm used to skimming over a (small) list of failures and this one got lost.
[Note to self: Finish installation of validate_failures.py.]

There are two ways to proceed here, based on the answer to this question: Does "show conv" include
convenience functions?  I can argue either way, but I prefer it including functions, so I've updated the
respective text.

Tested on amd64-linux with/without Python.
I will check this in in a few days if there are no objections.
[modulo doc RFA: Eli?]

btw, I changed "print $foo=1" to "set $foo=1" in the output of
"help show conv".  I think it's cleaner.

(Continue reading)

Eli Zaretskii | 11 Aug 2012 19:54
Picon

Re: Regression for gdb.base/default.exp: show convenience [Re: [RFA, doc RFA] Implement $_memeq, $_streq, $_strlen]

> Date: Sat, 11 Aug 2012 10:46:01 -0700
> Cc: Tom Tromey <tromey <at> redhat.com>,
>     Eli Zaretskii <eliz <at> gnu.org>,
>     gdb-patches <at> sourceware.org
> From: dje <at> google.com
> 
> I will check this in in a few days if there are no objections.
> [modulo doc RFA: Eli?]

No objections, thanks.

Jan Kratochvil | 11 Aug 2012 21:23
Picon
Favicon

Re: Regression for gdb.base/default.exp: show convenience [Re: [RFA, doc RFA] Implement $_memeq, $_streq, $_strlen]

On Sat, 11 Aug 2012 19:46:01 +0200, dje <at> google.com wrote:
> Tested on amd64-linux with/without Python.

Confirming it also works for me now.

Thanks,
Jan


Gmane