Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
To: dave@hiauly1.hia.nrc.ca (John David Anglin)
Cc: gdb-patches@sourceware.cygnus.com
Subject: Re: Missing routines: gdb/top.c
Date: Tue, 15 Jun 1999 20:10:00 -0000	[thread overview]
Message-ID: <199906160309.XAA04263@hiauly1.hia.nrc.ca> (raw)
In-Reply-To: <no.id>

The module top.c seems to have been corrupted in the most recent
cvs release (19990614).  It appears to be missing procedures such
as init_main.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)
From jsm@cygnus.com Tue Jun 15 23:18:00 1999
From: Jason Molenda <jsm@cygnus.com>
To: John David Anglin <dave@hiauly1.hia.nrc.ca>
Cc: gdb-patches@sourceware.cygnus.com, gdb-testers@sourceware.cygnus.com
Subject: 1999-06-14 snapshot is missing part of top.c (was: Missing routines: gdb/top.c)
Date: Tue, 15 Jun 1999 23:18:00 -0000
Message-id: <19990615231757.A5630@cygnus.com>
References: <no.id> <199906160309.XAA04263@hiauly1.hia.nrc.ca> <199906160309.XAA04263@hiauly1.hia.nrc.ca>
X-SW-Source: 1999-q2/msg00128.html
Content-length: 492

On Tue, Jun 15, 1999 at 11:09:58PM -0400, John David Anglin wrote:
> 
> The module top.c seems to have been corrupted in the most recent
> cvs release (19990614).  It appears to be missing procedures such
> as init_main.

Well, that was a silly mistake.

I've attached a patch that includes the missing lines of gdb/top.c.
The next snapshot will be correct.c.  I'm not going to fix the CVS
repository, it'll get fixed next Monday when I import the next snapshot.

Thanks for the note,

Jason
From jimb@cygnus.com Thu Jun 17 13:18:00 1999
From: Jim Blandy <jimb@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: patch: parsing Java characters
Date: Thu, 17 Jun 1999 13:18:00 -0000
Message-id: <199906172018.PAA14268@zwingli.cygnus.com>
X-SW-Source: 1999-q2/msg00129.html
Content-length: 7509

This is about to be committed.

1999-06-04  Jim Blandy	<jimb@savonarola.red-bean.com>

	Make the '/c' print format use a true character type.  This is
	more appropriate than builtin_type_char for languages other than
	C, and C tolerates it.
	* gdbtypes.c (builtin_type_true_char): New variable.
	(build_gdbtypes): Initialize it.
	* gdbtypes.h (builtin_type_true_char): New declaration.
	* printcmd.c (print_scalar_formatted): When the format is 'c',
	extract the value as a builtin_type_true_char.

Index: gdb/gdbtypes.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtypes.c,v
retrieving revision 2.88.12.1
diff -c -c -2 -p -r2.88.12.1 gdbtypes.c
*** gdb/gdbtypes.c	1999/03/26 01:06:29	2.88.12.1
--- gdb/gdbtypes.c	1999/06/11 04:21:10
*************** Foundation, Inc., 59 Temple Place - Suit
*** 39,42 ****
--- 39,43 ----
  struct type *builtin_type_void;
  struct type *builtin_type_char;
+ struct type *builtin_type_true_char;
  struct type *builtin_type_short;
  struct type *builtin_type_int;
*************** build_gdbtypes ()
*** 2785,2789 ****
  	       "char", (struct objfile *) NULL);
    TYPE_FLAGS (builtin_type_char) |= TYPE_FLAG_NOSIGN;
!   
    builtin_type_signed_char =
      init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
--- 2786,2793 ----
  	       "char", (struct objfile *) NULL);
    TYPE_FLAGS (builtin_type_char) |= TYPE_FLAG_NOSIGN;
!   builtin_type_true_char = 
!     init_type (TYPE_CODE_CHAR, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
! 	       0,
! 	       "true character", (struct objfile *) NULL);
    builtin_type_signed_char =
      init_type (TYPE_CODE_INT, TARGET_CHAR_BIT / TARGET_CHAR_BIT,
Index: gdb/gdbtypes.h
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdbtypes.h,v
retrieving revision 2.71.12.1
diff -c -c -2 -p -r2.71.12.1 gdbtypes.h
*** gdb/gdbtypes.h	1999/03/26 01:06:30	2.71.12.1
--- gdb/gdbtypes.h	1999/06/11 04:21:11
*************** extern struct type *builtin_type_int64;
*** 845,848 ****
--- 845,853 ----
  extern struct type *builtin_type_uint64;
  
+ /* We use this for the '/c' print format, because builtin_type_char is
+    just a one-byte integral type, which languages less laid back than
+    C will print as ... well, a one-byte integral type.  */
+ extern struct type *builtin_type_true_char;
+ 
  /* This type represents a type that was unrecognized in symbol
     read-in.  */
Index: gdb/printcmd.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/printcmd.c,v
retrieving revision 1.148
diff -c -c -2 -p -r1.148 printcmd.c
*** gdb/printcmd.c	1999/03/10 00:14:04	1.148
--- gdb/printcmd.c	1999/06/11 04:21:12
*************** print_scalar_formatted (valaddr, type, f
*** 443,448 ****
  
      case 'c':
!       value_print (value_from_longest (builtin_type_char, val_long), stream, 0,
! 		   Val_pretty_default);
        break;
  
--- 443,448 ----
  
      case 'c':
!       value_print (value_from_longest (builtin_type_true_char, val_long),
! 		   stream, 0, Val_pretty_default);
        break;
  
Index: gdb/testsuite/gdb.java/jv-print.exp
===================================================================
RCS file: jv-print.exp
diff -N jv-print.exp
*** gdb/testsuite/gdb.java/jv-print.exp	Mon Dec 31 20:00:00 1979
--- gdb/testsuite/gdb.java/jv-print.exp	Thu Jun 10 22:00:25 1999
***************
*** 0 ****
--- 1,141 ----
+ # Copyright (C) 1999 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.  
+ 
+ # Please email any bugs, comments, and/or additions to this file to:
+ # bug-gdb@prep.ai.mit.edu
+ 
+ if $tracelevel then {
+ 	strace $tracelevel
+ }
+ 
+ set prms_id 0
+ set bug_id 0
+ 
+ # Set the current language to Java.  This counts as a test.  If it
+ # fails, then we skip the other tests.
+ 
+ proc set_lang_java {} {
+     global gdb_prompt
+ 
+     if [gdb_test "set language java" "" "set language java"] {
+ 	return 0
+     }
+ 
+     if [gdb_test "show language" ".* source language is \"java\".*"] {
+ 	return 0
+     }
+     return 1;
+ }
+ 
+ proc test_integer_literals_accepted {} {
+     global gdb_prompt
+ 
+     # Test various decimal values.
+ 
+     gdb_test "p 123" " = 123"
+     gdb_test "p -123" " = -123"
+     gdb_test "p/d 123" " = 123"
+ 
+     # Test various octal values.
+ 
+     gdb_test "p 0123" " = 83"
+     gdb_test "p 00123" " = 83"
+     gdb_test "p -0123" " = -83"
+     gdb_test "p/o 0123" " = 0123"
+ 
+     # Test various hexadecimal values.
+ 
+     gdb_test "p 0x123" " = 291"
+     gdb_test "p -0x123" " = -291"
+     gdb_test "p 0x0123" " = 291"
+     gdb_test "p -0x0123" " = -291"
+     gdb_test "p 0xABCDEF" " = 11259375"
+     gdb_test "p 0xabcdef" " = 11259375"
+     gdb_test "p 0xAbCdEf" " = 11259375"
+     gdb_test "p/x 0x123" " = 0x123"
+ }
+ 
+ proc test_character_literals_accepted {} {
+     global gdb_prompt
+ 
+     gdb_test "p 'a'" " = 'a'"
+     gdb_test "p/c 'a'" " = 'a'"
+     gdb_test "p/c 70" " = 'F'"
+     gdb_test "p/x 'a'" " = 0x61"
+     gdb_test "p/d 'a'" " = 97"
+     gdb_test "p/t 'a'" " = 1100001"
+     gdb_test "p/x '\\377'" " = 0xff"
+     gdb_test "p '\\''" " = '\\\\''"
+     # Note "p '\\'" => "= 92 '\\'"
+     gdb_test "p '\\\\'" " = '\\\\\\\\'"
+ 
+     # Test the /c print format.
+ }
+ 
+ proc test_integer_literals_rejected {} {
+     global gdb_prompt
+ 
+     test_print_reject "p 0x" 
+     gdb_test "p ''" "Empty character constant\\."
+     gdb_test "p '''" "Empty character constant\\."
+     test_print_reject "p '\\'"
+ 
+     # Note that this turns into "p '\\\'" at gdb's input.
+     test_print_reject "p '\\\\\\'"
+ 
+     # Test various decimal values.
+ 
+     test_print_reject "p DEADBEEF"
+ 
+     test_print_reject "p 123DEADBEEF"
+     test_print_reject "p 123foobar.bazfoo3"
+     test_print_reject "p 123EEEEEEEEEEEEEEEEE33333k333"
+     gdb_test "p 123.4+56.7" "180.(099\[0-9]*|100\[0-9\]*)" "check for floating addition"
+ 
+     # Test various octal values.
+ 
+     test_print_reject "p 09" 
+     test_print_reject "p 079" 
+ 
+     # Test various hexadecimal values.
+ 
+     test_print_reject "p 0xG" 
+     test_print_reject "p 0xAG" 
+ }
+ 
+ 
+ 
+ # Start with a fresh gdb.
+ 
+ gdb_exit
+ gdb_start
+ gdb_reinitialize_dir $srcdir/$subdir
+ 
+ gdb_test "print \$pc" "No registers\\."
+ # FIXME: should also test "print $pc" when there is an execfile but no
+ # remote debugging target, process or corefile.
+ 
+ gdb_test "set print sevenbit-strings" ""
+ gdb_test "set print address off" "" ""
+ gdb_test "set width 0" ""
+ 
+ if [set_lang_java] then {
+     test_integer_literals_accepted
+     test_character_literals_accepted
+     test_integer_literals_rejected
+ } else {
+     fail "Java print command tests suppressed"
+ }


  parent reply	other threads:[~1999-06-15 20:10 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-10  0:30 [RFA] patch to add 'maint profile-gdb' command Jason Molenda
2001-09-10  8:48 ` Andrew Cagney
2001-09-10  8:58   ` Eli Zaretskii
2001-09-10  9:04     ` Andrew Cagney
2001-09-10 11:52   ` Jason Molenda
2001-09-10 13:43     ` Eli Zaretskii
2001-09-10 13:59       ` Jason Molenda
2001-09-11  0:38         ` Eli Zaretskii
     [not found]           ` <no.id>
1999-06-15 20:10             ` John David Anglin [this message]
2001-09-11  1:37             ` Jason Molenda
2001-09-11  1:57               ` Eli Zaretskii
2001-09-12  0:00             ` Jason Molenda
2001-09-12  6:00               ` Eli Zaretskii
2001-09-12  7:42                 ` Jason Molenda
2001-09-12  9:06                   ` Eli Zaretskii
2001-09-12 11:58                     ` Tom Tromey
2001-09-12 13:16                       ` Jason Molenda
2008-08-06 19:24             ` [patch] Don't set DT_HP_DEBUG_PRIVATE in solib-pa64.c John David Anglin
2008-08-06 19:49               ` Mark Kettenis
2008-08-06 20:09                 ` John David Anglin
2008-08-06 23:10                 ` John David Anglin
2008-08-07 21:39               ` [patch] Only force private mapping of shared libraries in solib-som.c on HP-UX 10 and earlier John David Anglin
2008-08-08 10:48                 ` Joel Brobecker
2008-08-08 15:34                   ` John David Anglin
2008-08-09 14:37                     ` Joel Brobecker
2008-08-09 18:59                       ` John David Anglin
2008-08-08 19:30             ` ttrace: Protocal error John David Anglin
2008-08-08 20:16               ` John David Anglin
2008-08-09 14:52                 ` Pedro Alves
2008-08-09 15:34                   ` John David Anglin
2008-08-09 18:49                   ` John David Anglin
2008-08-09 22:45                     ` Pedro Alves
2008-08-09 22:46                   ` Pedro Alves
2008-08-09 22:51                     ` Pedro Alves
2008-08-09 23:19                       ` John David Anglin
2008-08-09 22:48                   ` Pedro Alves
2008-08-09 14:53                 ` Joel Brobecker
2008-08-09 23:40             ` John David Anglin
2008-08-10  0:46             ` [4/7] Adjust the ttrace target (HP-UX) to always register the John David Anglin
2008-09-15  2:08             ` [PATCH] Fix dwarf register column to gdb register mapping John David Anglin
2008-09-15  2:24             ` [PATCH] Fix hppa_linux_sigtramp_frame_unwind_cache John David Anglin
2001-09-12 11:28     ` [RFA] patch to add 'maint profile-gdb' command Andrew Cagney
2001-09-12 11:43     ` Andrew Cagney
2001-09-16 17:45       ` [RFA] Version 2 of " Jason Molenda
2001-09-17 22:39         ` Andrew Cagney
2001-09-18 17:52           ` Fernando Nasser
2001-09-18 17:56             ` Andrew Cagney
2001-09-19  7:11               ` Fernando Nasser
2001-09-19  7:28                 ` Eli Zaretskii
2001-09-19  9:29                   ` Fernando Nasser
2001-09-19 11:30                     ` Eli Zaretskii
2001-09-19 11:41                     ` Andrew Cagney
2001-09-19 11:53                     ` Kevin Buettner
     [not found]         ` <200109170536.HAA21988@is.elta.co.il>
2001-09-17 15:08           ` Michael Snyder
2001-09-17 22:43           ` Andrew Cagney
2001-09-17 23:59             ` Eli Zaretskii
2001-09-24 13:33               ` Jason Molenda
2001-09-24 14:41                 ` Andrew Cagney
2001-09-24 14:58                   ` Eli Zaretskii
2001-09-24 15:13                     ` Andrew Cagney
2001-09-24 14:53                 ` Eli Zaretskii

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=199906160309.XAA04263@hiauly1.hia.nrc.ca \
    --to=dave@hiauly1.hia.nrc.ca \
    --cc=gdb-patches@sourceware.cygnus.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