Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Wu Zhou <woodzltc@cn.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFC] A patch for parse_number (c-exp.y) to recognize 1.25f
Date: Tue, 20 Sep 2005 09:18:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.63.0509201704140.13430@linux.site> (raw)
In-Reply-To: <20050917204405.GB7967@nevyn.them.org>

Hi Daniel,

> This looks good.  I have some comments on formatting and testing, but
> that's it.

Thanks for your comment. They are very helpful and informative indeed.

> > 
> > 	* c-exp.y (parse-number): Modify the float parsing logic to let it 
> > 	recognize the suffix.
> 
> "a suffix" rather than "the suffix", please.

Changed.

> 
> > !       if (num == 1)
> > ! 	putithere->typed_val_float.type = builtin_type (current_gdbarch)
> > ! 					    ->builtin_double;
> 
> Instead of splitting this line (and the two below) in the middle of a
> single reference, you can split it at the assignment.  Like this - two
> spaces in the continued line:
> 
> 	putithere->typed_val_float.type
> 	  = builtin_type (current_gdbarch)->builtin_double;
> 
> Emacs'll butcher your version, I'm afraid.

I am not familar with Emacs.  But I believe that you are right.  Fixed.

[snip]
> 
> It's a pretty trivial test case; but please add a copyright notice
> anyway.

Added.

> 
> > + # Run to the breakpoint at return.
> > + set bp_location [gdb_get_line_number "return"]
> > + gdb_test "break $bp_location" \
> > +     "Breakpoint.*at.* file .*$srcfile, line $bp_location\\." \
> > +     "breakpoint at return"
> > + gdb_test "continue" \
> > +     "Continuing\\..*Breakpoint.*" \
> > +     "continue to breakpoint"
> 
> This is fine, but you can also use gdb_breakpoint and
> gdb_continue_to_brekpoint or gdb_continue.

Switched to gdb_breakpoint and gdb_continue_to_brekpoint.

> 
> > + # Test that gdb could handle the above correctly with "set var" command.
> > + send_gdb "set var b32=10.5f\n"
> > + gdb_expect {
> > +     -re "$gdb_prompt $" { pass "set var b32=10.5f" }
> > +     -re "Invalid number" { fail "do not recognize 10.5f" }
> > +     timeout     {fail "set var b32=10.5f" }
> > +   }
> 
> Please don't use "send_gdb" and "gdb_expect" directly.  Also, the
> passing and failing tests should have the same message - an optional
> string at the end in parentheses explaining the failure is OK, but
> anything else is bad for automated testing.

Good guideline.  I am now using gdb_test_multiple.

I had run the modified testcase against patched and un-patched GDB. It 
report expected test result.  Both the patch and testcases are checked in.  

Thanks.

Regards
- Wu Zhou


      reply	other threads:[~2005-09-20  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-05  2:16 Wu Zhou
2005-09-15  8:35 ` Wu Zhou
2005-09-17 20:44   ` Daniel Jacobowitz
2005-09-20  9:18     ` Wu Zhou [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=Pine.LNX.4.63.0509201704140.13430@linux.site \
    --to=woodzltc@cn.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.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