mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-28 23:39:35 +08:00
gdb/
Format the code for the next patch. * dwarf2read.c (struct mapped_index): Include delimiting newlines. * utils.c (strcmp_iw_ordered): Reformat the code for the next patch. New variables c1 and c2.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
2011-04-27 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
Format the code for the next patch.
|
||||||
|
* dwarf2read.c (struct mapped_index): Include delimiting newlines.
|
||||||
|
* utils.c (strcmp_iw_ordered): Reformat the code for the next patch.
|
||||||
|
New variables c1 and c2.
|
||||||
|
|
||||||
2011-04-27 Ulrich Weigand <ulrich.weigand@linaro.org>
|
2011-04-27 Ulrich Weigand <ulrich.weigand@linaro.org>
|
||||||
|
|
||||||
* infrun.c (proceed): Do not single-step into signal delivery
|
* infrun.c (proceed): Do not single-step into signal delivery
|
||||||
|
@ -151,14 +151,19 @@ struct mapped_index
|
|||||||
{
|
{
|
||||||
/* The total length of the buffer. */
|
/* The total length of the buffer. */
|
||||||
off_t total_size;
|
off_t total_size;
|
||||||
|
|
||||||
/* A pointer to the address table data. */
|
/* A pointer to the address table data. */
|
||||||
const gdb_byte *address_table;
|
const gdb_byte *address_table;
|
||||||
|
|
||||||
/* Size of the address table data in bytes. */
|
/* Size of the address table data in bytes. */
|
||||||
offset_type address_table_size;
|
offset_type address_table_size;
|
||||||
|
|
||||||
/* The symbol table, implemented as a hash table. */
|
/* The symbol table, implemented as a hash table. */
|
||||||
const offset_type *symbol_table;
|
const offset_type *symbol_table;
|
||||||
|
|
||||||
/* Size in slots, each slot is 2 offset_types. */
|
/* Size in slots, each slot is 2 offset_types. */
|
||||||
offset_type symbol_table_slots;
|
offset_type symbol_table_slots;
|
||||||
|
|
||||||
/* A pointer to the constant pool. */
|
/* A pointer to the constant pool. */
|
||||||
const char *constant_pool;
|
const char *constant_pool;
|
||||||
};
|
};
|
||||||
|
85
gdb/utils.c
85
gdb/utils.c
@ -3023,47 +3023,54 @@ strcmp_iw (const char *string1, const char *string2)
|
|||||||
int
|
int
|
||||||
strcmp_iw_ordered (const char *string1, const char *string2)
|
strcmp_iw_ordered (const char *string1, const char *string2)
|
||||||
{
|
{
|
||||||
while ((*string1 != '\0') && (*string2 != '\0'))
|
/* Formatting stub. */
|
||||||
|
if (1)
|
||||||
{
|
{
|
||||||
while (isspace (*string1))
|
/* C1 and C2 are valid only if *string1 != '\0' && *string2 != '\0'.
|
||||||
{
|
Provide stub characters if we are already at the end of one of the
|
||||||
string1++;
|
strings. */
|
||||||
}
|
char c1 = 'X', c2 = 'X';
|
||||||
while (isspace (*string2))
|
|
||||||
{
|
|
||||||
string2++;
|
|
||||||
}
|
|
||||||
if (*string1 != *string2)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (*string1 != '\0')
|
|
||||||
{
|
|
||||||
string1++;
|
|
||||||
string2++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (*string1)
|
while (*string1 != '\0' && *string2 != '\0')
|
||||||
{
|
{
|
||||||
/* Characters are non-equal unless they're both '\0'; we want to
|
while (isspace (*string1))
|
||||||
make sure we get the comparison right according to our
|
string1++;
|
||||||
comparison in the cases where one of them is '\0' or '('. */
|
while (isspace (*string2))
|
||||||
case '\0':
|
string2++;
|
||||||
if (*string2 == '\0')
|
|
||||||
return 0;
|
c1 = *string1;
|
||||||
else
|
c2 = *string2;
|
||||||
return -1;
|
if (c1 != c2)
|
||||||
case '(':
|
break;
|
||||||
if (*string2 == '\0')
|
|
||||||
return 1;
|
if (*string1 != '\0')
|
||||||
else
|
{
|
||||||
return -1;
|
string1++;
|
||||||
default:
|
string2++;
|
||||||
if (*string2 == '(')
|
}
|
||||||
return 1;
|
}
|
||||||
else
|
|
||||||
return *string1 - *string2;
|
switch (*string1)
|
||||||
|
{
|
||||||
|
/* Characters are non-equal unless they're both '\0'; we want to
|
||||||
|
make sure we get the comparison right according to our
|
||||||
|
comparison in the cases where one of them is '\0' or '('. */
|
||||||
|
case '\0':
|
||||||
|
if (*string2 == '\0')
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
case '(':
|
||||||
|
if (*string2 == '\0')
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
default:
|
||||||
|
if (*string2 == '\0' || *string2 == '(')
|
||||||
|
return 1;
|
||||||
|
else
|
||||||
|
return c1 - c2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user