Petr Hluzín | 1 May 2011 03:19
Picon

Re: [PATCH] arm reversible : <phase_2_complete>

On 25 April 2011 16:03, paawan oza <paawan1982 <at> yahoo.com> wrote:
> Hi Petr,
>
> I have implemented your review comments.

Typo "hamdle" in thumb_hamdle_ld_st_stack_insn() still exists.

I decoded the `arm_mem_r *arm_mems' strucutre:

arm_mems[0].len - is number of valid records `arm_mems[i]' after [0].
arm_mems[i].len - is number of bytes modified by the instruction.
arm_mems[0].addr - is undefined (never written, never read) - except
on line: thumb_insn_r->arm_mems[0].addr =
u_buf[0].s_word+u_buf[1].s_word;
arm_mems[i].addr - is target address of the modified block (for i=1..)

This is reusing field arm_mem_r::len for two different things.
This is ugly.

Move the counter into insn_decode_record_t. Or use struct arm_mem_r {
	int count;
	struct {
		uint32_t len;
		CORE_ADDR addr;
	} array[0];
}

Each instance of insn_decode_record_t is allocated and freed before
new instance is allocated, therefore its size does not matter.

(Continue reading)

Jan Kratochvil | 1 May 2011 11:16
Picon
Favicon

Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649)

On Thu, 28 Apr 2011 17:14:31 +0200, Pedro Alves wrote:
>  set oldtimeout1 $timeout
> -set timeout 30
> +set timeout 10

10 is too low for parallel runs where machine can be in 20+ load.  I do not
see this test needs to excercise $timeout, I would even remove this whole
override.

>  <at>  <at>  -114,7 +113,6  <at>  <at>  gdb_expect  {
>  #exp_internal 0
>  
>  send_gdb "show output\t"
> -sleep 1
>  gdb_expect  {
>          -re "^show output-radix $"\
>              { send_gdb "\n"
###              gdb_expect {
###                      -re "Default output radix for printing of values is 10\\..*$gdb_prompt $"\
###                                        { pass "complete 'show output'"}
###                      -re ".*$gdb_prompt $" { fail "complete 'show output'"}
>  <at>  <at>  -125,16 +123,6  <at>  <at>  gdb_expect  {
>                        timeout           {fail "(timeout) complete 'show output'"}
>                       }
>              }
> -        -re "^show output$"\
> -            { send_gdb "\n"
> -               gdb_expect {
> -                      -re "Default output radix for printing of values is 10\\..*$gdb_prompt $"\
> -                                        { fail "complete 'show output'"}
(Continue reading)

Jan Kratochvil | 1 May 2011 13:16
Picon
Favicon

[patch] testsuite: Test readline-6.2 "ask" regression

Hi,

this problem does not affect default FSF GDB build as it is using bundled
readline-5.1.  But with system readline-6.2 and build using:
  --with-system-readline  use installed readline library

GDB will no longer ask about displaying too many symbols and dumps them all
immediately.
PASS:
	$ gdb gdb
	(gdb) p <tab><tab>
	Display all 21482 possibilities? (y or n)_
FAIL:
	$ gdb gdb
	(gdb) p <tab><tab>
	Display all 22129 possibilities? (y or n)
	../../bfd/aout-target.h                                      cs_to_section
	../../bfd/aout32.c                                           ctime
	<screens and screens of dumps without any question>

This regression will soon start affecting distros:
	FSF GDB HEAD  - PASS - using bundled readline-5.1
	fedora-15     - FAIL - using system  readline-6.2
	fedora-14     - PASS - using system  readline-6.1
	debian-6.0    - PASS - using system  readline-6.1
	kubuntu-10.10 - PASS - using system  readline-6.1

I have asked about it on readline ml:
	Re: [Bug-readline] callback mode pager disable status
	https://lists.gnu.org/archive/html/bug-readline/2011-04/msg00012.html
(Continue reading)

Jan Kratochvil | 1 May 2011 14:29
Picon
Favicon

[patch 0/3] readline-6.2 rebase

Hi,

the change is prepared with readable separate commits in the branch:
	http://sourceware.org/gdb/wiki/ArcherBranchManagement
	archer-jankratochvil-readline62

as the patch itself is too huge to post for non-GIT accessible way one can
patch readline-6.2 by 001, move it to src/readline:
	ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
	ftp://ftp.gnu.org/gnu/readline/readline-6.2-patches/readline62-001
And patch it by this [patch 1/3], patch [2/3] and patch [3/3].

There files were omitted from the readline-6.2 tree (like before):
	Only in readline-6.2-001/doc: history.0
	Only in readline-6.2-001/doc: history.dvi
	Only in readline-6.2-001/doc: history.html
	Only in readline-6.2-001/doc: history.info
	Only in readline-6.2-001/doc: history.pdf
	Only in readline-6.2-001/doc: history.ps
	Only in readline-6.2-001/doc: history_3.ps
	Only in readline-6.2-001/doc: readline.0
	Only in readline-6.2-001/doc: readline.dvi
	Only in readline-6.2-001/doc: readline.html
	Only in readline-6.2-001/doc: readline.info
	Only in readline-6.2-001/doc: readline.pdf
	Only in readline-6.2-001/doc: readline.ps
	Only in readline-6.2-001/doc: readline_3.ps
	Only in readline-6.2-001/doc: rluserman.dvi
	Only in readline-6.2-001/doc: rluserman.html
	Only in readline-6.2-001/doc: rluserman.info
(Continue reading)

Jan Kratochvil | 1 May 2011 14:29
Picon
Favicon

[patch 1/3] readline-6.2: Merge of already posted patches

Hi,

the merged patch here in [patch 1/3] is:
	[Bug-readline] [RFC/readline] bind.c, rl_function_dumper, Free allocated
	http://lists.gnu.org/archive/html/bug-readline/2011-03/msg00000.html
	[Bug-readline] [patch] Fix underquotation in readline/examples/rlfe/conf
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00001.html
	[Bug-readline] [patch] Makefile.in htm<->html
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00002.html
	Re: [Bug-readline] [patch] Makefile.in dependency: callback.o: xmalloc.h
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00004.html
	[Bug-readline] [patch] Remove . from the VPATH directive
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00005.html
	Eli Zaretskii's __MSDOS__ / __GO32__ / __MINGW32__ / __DJGPP__ stuff:
	http://sourceware.org/ml/gdb/2011-04/msg00002.html
	Jan Kratochvil's patch for FSF GDB tree local-specific changes:
	http://sourceware.org/ml/gdb/2011-04/msg00006.html
	Preservation of existing ChangeLog.gdb files, their updates.

This merge expanded per-patch is present in the Archer GIT branch, I did not
consider it useful to re-post it patch-per-mail again when they are for
a foreign (readline) project anyway.

This patch posted upstream is considered obsolete and not included here:
	[Bug-readline] Unused support/wcwidth.c
	http://lists.gnu.org/archive/html/bug-readline/2011-04/msg00000.html


Thanks,
Jan
(Continue reading)

Jan Kratochvil | 1 May 2011 14:30
Picon
Favicon

[patch 2/3] readline-6.2: Workaround "ask" regression

Hi,

testcase+discussion is:
	[patch] testsuite: Test readline-6.2 "ask" regression
	http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html

Thanks,
Jan

2011-04-30  Jan Kratochvil  <jan.kratochvil <at> redhat.com>

	Workaround gdb.base/completion.exp regression on readline-6.2.
	* complete.c (get_y_or_n): Disable the return on RL_STATE_CALLBACK.

--- ./readline-6.2-001/complete.c	2011-01-16 21:32:57.000000000 +0100
+++ ./readline/complete.c	2011-05-01 13:30:29.000000000 +0200
 <at>  <at>  -481,6 +481,10  <at>  <at>  get_y_or_n (for_pager)
 {
   int c;

+/* Disabled for GDB due to the gdb.base/readline-ask.exp regression.
+   [patch] testsuite: Test readline-6.2 "ask" regression
+   http://sourceware.org/ml/gdb-patches/2011-05/msg00002.html  */
+#if 0
   /* For now, disable pager in callback mode, until we later convert to state
      driven functions.  Have to wait until next major version to add new
      state definition, since it will change value of RL_STATE_DONE. */
 <at>  <at>  -488,6 +492,7  <at>  <at>  get_y_or_n (for_pager)
   if (RL_ISSTATE (RL_STATE_CALLBACK))
     return 1;
(Continue reading)

Jan Kratochvil | 1 May 2011 14:31
Picon
Favicon

[patch 3/3] readline-6.2: Revert 5.x compat., apply 6.x compat.

Hi,

this patch reverts:
	[patch] Fix --with-system-readline vs. readline-6.0+
	http://sourceware.org/ml/gdb-patches/2009-07/msg00755.html

as I believe when there will be readline-6.2 in-tree there is no need to
support --with-system-readline with system readline-5.x.

And it also applies the change unconditionally as predicted in that mail.

Thanks,
Jan

gdb/
2011-04-25  Jan Kratochvil  <jan.kratochvil <at> redhat.com>

	* config.in: Regenerate.
	* configure: Regenerate.
	* configure.ac <--with-system-readline> (for readline_echoing_p):
	Remove the test.
	* tui/tui-io.c (tui_old_readline_echoing_p): Rename to ...
	(tui_old_rl_echoing_p): ... here.
	(tui_setup_io): Rename extern declaration readline_echoing_p to
	_rl_echoing_p.  Adjust assignments for the both renames.

--- a/gdb/configure.ac
+++ b/gdb/configure.ac
 <at>  <at>  -539,21 +539,6  <at>  <at>  if test "$with_system_readline" = yes; then
   READLINE_DEPS=
(Continue reading)

Doug Evans | 1 May 2011 20:34
Picon
Favicon

Re: [RFA] Add $pdir as entry for libthread-db-search-path.

On Fri, Apr 29, 2011 at 12:00 PM, Doug Evans <dje <at> google.com> wrote:
> On Fri, Apr 29, 2011 at 10:08 AM, Jan Kratochvil <jan.kratochvil <at> redhat.com>
> wrote:
>>
>> On Fri, 29 Apr 2011 18:49:09 +0200, Doug Evans wrote:
>> > On Fri, Apr 29, 2011 at 5:36 AM, Jan Kratochvil
>> > <jan.kratochvil <at> redhat.com> wrote:
>> > > This is insecure default.  It is something like the FSF GDB insecure
>> > > .gdbinit
>> > > behavior which many distros (at least Fedora but even others) have to
>> > > patch.
>> >
>> > Does Fedora turn off the autoloading of python?
>>
>> No.
>>
>> > How do your pretty printers Just Work?
>> > [Or maybe you only autoload if the directory is in $prefix/lib/debug
>> > or some such?]
>>
>> You are right it is a security hole, I have not tracked to Python
>> autoloading
>> much.  It should get CVE and security errata assigned as it is the same
>> category of a security breach as was:
>>        http://cve.mitre.org/cgi-bin/cvename.cgi?name=2006-4146
>>
>>
>> > Plus I wonder how easy it would be to build a program that used an
>> > accompanying libpthread that didn't match the system libthread_db -
>> > gdb would then pick the accompanying libthread_db.  Or does Fedora not
(Continue reading)

Tom Tromey | 2 May 2011 15:27
Picon
Favicon

Re: [PATCH] arm reversible : <phase_2_complete>

>>>>> "Oza" == paawan oza <paawan1982 <at> yahoo.com> writes:

Oza> So you are suggesting;
Oza> GET_REG_VAL (reg_cache, ARM_PC_REGNUM, &u_buf.buf[0]);
Oza> if (target is big endian)
Oza>   {
Oza>         convert_big_to_little (u_buf.s_word)
Oza>   }
Oza> something like above ?
Oza> right ?

More or less, but if you use the existing functions like
extract_unsigned_integer or extract_typed_address, then they
will handle all the details.

Oza> and while replaying do I need to convert it to big endian ?
Oza> somethig like that ?

It depends on what you are doing.

If you are doing calculations on some number, then you have to extract
it properly so that the host math works correctly.  If you are just
storing some data to be restored verbatim, then you don't need to
convert at all.

Tom

Marek Polacek | 2 May 2011 15:59
Picon
Favicon

Re: [RFC] Fixing gdb.base/completion.exp (PR testsuite/12649)

On 05/01/2011 11:16 AM, Jan Kratochvil wrote:
> 10 is too low for parallel runs where machine can be in 20+ load.  I do not
> see this test needs to excercise $timeout, I would even remove this whole
> override.

I removed this.

> The problem with this proposed intermediate step is that it in fact brings a
> testsuite regression.  Original "sleep 1" was there to ensure all the output
> has been caught.  This was racy but in most cases it worked.
> 
> Now it will false PASS with regressing GDB where the current FSF GDB HEAD
> testcase would correctly FAIL.  If GDB outputs "show output-radix " first and
> after 0.5sec it yet outputs "foobar" the original testcase correctly FAILed
> while the current testcase will falsely PASS.

I see your point.  However, even with sleep 1, if GDB outputs "foobar"
after 1.1 sec, the test still incorrectly PASSes.  This is a no-win 
situation.

> The "complete" command appraoch does introduce this new kind of race.

Yeah :(.  Basically, we would like to have some kind of signal, that the
`complete' is all done and thus we can test the result, IIUC.

> But the patch can be commited in two parts if it is preferred although
> reviewing these racy send_gdb-gdb_expect cases for the intermediate step is
> tricky and it gets dropped immediately afterwards.

I propose to apply the attached patch.  It is basically Pedro's patch, but
(Continue reading)


Gmane