Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Hui Zhu <teawater@gmail.com>
Cc: Tom Tromey <tromey@redhat.com>,
	       gdb-patches ml <gdb-patches@sourceware.org>
Subject: Re: [PATCH] printcmd.c (ui_printf): make internalvar string can be printf and eval when inferior cannot alloc memory
Date: Fri, 09 Sep 2011 12:32:00 -0000	[thread overview]
Message-ID: <20110909075846.GA3468@host1.jankratochvil.net> (raw)
In-Reply-To: <CANFwon17PEDOEe7JSTfne_ONgsD1n5DW-5cRhLxHayfFkAZDTA@mail.gmail.com>

On Fri, 09 Sep 2011 09:27:09 +0200, Hui Zhu wrote:
> >    gdb_test_no_output {set $a={'a','b'}}

(I forgot to state the original gdb_test expect string "" matches any output.)


> > Still this testcase FAILs for me:
> > printf "%s\n", $a^M
> > abX^M
> > (gdb) FAIL: gdb.base/printcmds.exp: printf "%s\n", $a
> >
> > Where X is some binary unprintable garbage character, not sure which way you
> > plan to fix it (maybe some `error' call if there is no zero-terminator?).
> 
> I didn't got this issue.  Could you post more info about this issue?

The primary problem is the regression with valgrind, as shown in:
	http://sourceware.org/ml/gdb-patches/2011-09/msg00084.html
	http://sourceware.org/gdb/wiki/TestingGDB#Running_GDB_under_Valgrind_in_the_testsuite

The valgrind regression is present even with live inferior (but GDB must not
valgrind-complain even on commands which were refused with error before).

Moreover when I link GDB with -lmcheck (which I always do) I get the testcase
FAIL as shown above but that is exactly the same GDB code patch problem as the
valgrind-shown case.

I did not try to but I think with proper size of the $a array GDB will crash.


very minor issue: Now with your recent change it will with -lmcheck:
	FAIL: gdb.base/printcmds.exp: printf "%s\n", $a
	FAIL: gdb.base/printcmds.exp: printf "%s\n", $a
 - the testcase names should be unique.


Thanks,
Jan


      reply	other threads:[~2011-09-09  7:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-20 10:37 Hui Zhu
2011-07-21 20:43 ` Tom Tromey
2011-08-14 15:10   ` Hui Zhu
2011-08-15 19:06     ` Tom Tromey
2011-08-16  4:58       ` Hui Zhu
2011-08-17 14:38         ` Tom Tromey
2011-08-18  2:54           ` Hui Zhu
2011-08-19 14:15             ` Tom Tromey
2011-09-06  8:50               ` Hui Zhu
2011-09-06 13:44                 ` Jan Kratochvil
2011-09-07  9:27                   ` Hui Zhu
2011-09-07 10:02                     ` Jan Kratochvil
2011-09-09  7:59                       ` Hui Zhu
2011-09-09 12:32                         ` Jan Kratochvil [this message]

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=20110909075846.GA3468@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=teawater@gmail.com \
    --cc=tromey@redhat.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