diff options
author | Pedro Alves <palves@redhat.com> | 2012-03-01 21:03:15 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-03-01 21:03:15 +0000 |
commit | e3084549910b1093135b8cb374300d8393fc76bf (patch) | |
tree | 3482b2ad983af4ceb51f3cba83cc39987deee4b3 | |
parent | 320b6f49d351803291509841a4930287597cd775 (diff) | |
download | gdb-e3084549910b1093135b8cb374300d8393fc76bf.zip gdb-e3084549910b1093135b8cb374300d8393fc76bf.tar.gz gdb-e3084549910b1093135b8cb374300d8393fc76bf.tar.bz2 |
2012-03-01 Pedro Alves <palves@redhat.com>
* ada-lang.c (ada_modulus_from_name): Delete.
* ada-lex.l (lexer_init): Make static.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/ada-lang.c | 31 | ||||
-rw-r--r-- | gdb/ada-lex.l | 2 |
3 files changed, 6 insertions, 32 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index f20d58b..e0baa2d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2012-03-01 Pedro Alves <palves@redhat.com> + * ada-lang.c (ada_modulus_from_name): Delete. + * ada-lex.l (lexer_init): Make static. + +2012-03-01 Pedro Alves <palves@redhat.com> + PR gdb/13767 * frame.c (read_frame_register_unsigned): New. diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 349ca17..4c17eaa 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10598,37 +10598,6 @@ ada_is_modular_type (struct type *type) && TYPE_UNSIGNED (subranged_type)); } -/* Try to determine the lower and upper bounds of the given modular type - using the type name only. Return non-zero and set L and U as the lower - and upper bounds (respectively) if successful. */ - -int -ada_modulus_from_name (struct type *type, ULONGEST *modulus) -{ - const char *name = ada_type_name (type); - const char *suffix; - int k; - LONGEST U; - - if (name == NULL) - return 0; - - /* Discrete type bounds are encoded using an __XD suffix. In our case, - we are looking for static bounds, which means an __XDLU suffix. - Moreover, we know that the lower bound of modular types is always - zero, so the actual suffix should start with "__XDLU_0__", and - then be followed by the upper bound value. */ - suffix = strstr (name, "__XDLU_0__"); - if (suffix == NULL) - return 0; - k = 10; - if (!ada_scan_number (suffix, k, &U, NULL)) - return 0; - - *modulus = (ULONGEST) U + 1; - return 1; -} - /* Assuming ada_is_modular_type (TYPE), the modulus of TYPE. */ ULONGEST diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l index 5102ff4..714265e 100644 --- a/gdb/ada-lex.l +++ b/gdb/ada-lex.l @@ -293,7 +293,7 @@ false { return FALSEKEYWORD; } /* Initialize the lexer for processing new expression. */ -void +static void lexer_init (FILE *inp) { BEGIN INITIAL; |