Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jerome Guitton <guitton@act-europe.fr>
To: gdb-patches@sources.redhat.com
Cc: Elena Zannoni <ezannoni@redhat.com>
Subject: [RFA/testsuite] Ada fixed points [was stabs: octal negative numbers]
Date: Thu, 25 Nov 2004 19:20:00 -0000	[thread overview]
Message-ID: <20041125192038.GA20252@adacore.com> (raw)
In-Reply-To: <20041123143812.GJ15300@adacore.com>

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

Jerome Guitton (guitton@act-europe.fr):

> OK, I will allocate some time to work on it this week, and I will
> commit this change when the testcase is accepted.

Test in attachement. OK to commit?

2004-11-25  Jerome Guitton  <guitton@gnat.com>

	* gdb.ada/fixed_points.c: New file.
	* gdb.ada/fixed_points.exp: New file.


[-- Attachment #2: fixed_points.exp --]
[-- Type: text/plain, Size: 1572 bytes --]

# Copyright 2004 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
# USA.  

if $tracelevel then {
    strace $tracelevel
}

load_lib "ada.exp"

set testfile "fixed_points"
set srcfile ${testfile}.adb
set binfile ${objdir}/${subdir}/${testfile}

if {[gdb_compile_ada "${srcfile}" "${binfile}" executable [list debug ]] != "" } {
  return -1
}

gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}

set bp_location [gdb_get_line_number "Set breakpoint here"]
send_gdb "break ${srcfile}:$bp_location\n"; gdb_expect -re "$gdb_prompt $"
send_gdb "run\n"; gdb_expect -re "$gdb_prompt $"

gdb_test "print base_object" \
         ".* = -50" \
         "p on a fixed point type"

gdb_test "print subtype_object" \
         ".* = -50" \
         "p on a subtype fixed point type"

gdb_test "print new_type_object" \
         ".* = -50" \
         "p on a new fixed point type"

[-- Attachment #3: fixed_points.adb --]
[-- Type: text/plain, Size: 688 bytes --]

with System;

procedure Fixed_Points is

   type Base_Fixed_Point_Type is
     delta 1.0 / 16.0
       range (System.Min_Int / 2) * 1.0 / 16.0 ..
       (System.Max_Int / 2) * 1.0 / 16.0;

     subtype Fixed_Point_Subtype is
       Base_Fixed_Point_Type range -50.0 .. 50.0;

     type New_Fixed_Point_Type is
       new Base_Fixed_Point_Type range -50.0 .. 50.0;

     Base_Object            : Base_Fixed_Point_Type := -50.0;
     Subtype_Object         : Fixed_Point_Subtype := -50.0;
     New_Type_Object        : New_Fixed_Point_Type := -50.0;
begin
   Base_Object := 1.0/16.0;   -- Set breakpoint here
   Subtype_Object := 1.0/16.0;
   New_Type_Object := 1.0/16.0;
end Fixed_Points;

  reply	other threads:[~2004-11-25 19:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-26 17:39 [RFA] stabs: octal negative numbers Jerome Guitton
2004-10-26 17:50 ` Joel Brobecker
2004-11-23 14:10 ` Jerome Guitton
2004-11-23 14:32   ` Elena Zannoni
2004-11-23 14:38     ` Jerome Guitton
2004-11-25 19:20       ` Jerome Guitton [this message]
2004-11-28 17:49         ` [RFA/testsuite] Ada fixed points [was stabs: octal negative numbers] Daniel Jacobowitz
2004-11-29 10:24           ` Jerome Guitton
2004-11-29 13:42             ` Daniel Jacobowitz
2004-11-29 15:21               ` Andrew Cagney
2004-11-29 15:26                 ` Daniel Jacobowitz
2004-11-29 17:24                 ` Jerome Guitton
2004-12-01 17:17                   ` Jerome Guitton
2004-12-13 17:21                     ` Jerome Guitton

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=20041125192038.GA20252@adacore.com \
    --to=guitton@act-europe.fr \
    --cc=ezannoni@redhat.com \
    --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