This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
s/read_string/read_direct_string/g
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 27 Jul 2010 23:27:28 +0100
- Subject: s/read_string/read_direct_string/g
I've applied this patch of Daniel's. It renames read_string
to read_direct_string, contrast with read_indirect_string. This was
originally part of a larger patch, but it's best we keep cosmetic
changes separate from functional changes.
--
Pedro Alves
2010-07-27 Daniel Jacobowitz <dan@codesourcery.com>
* dwarf2read.c (read_string): Rename to ...
(read_direct_string): ... this.
(skip_one_die, read_attribute_value, dwarf_decode_line_header)
(dwarf_decode_lines, dwarf_decode_macros): Adjust.
---
gdb/dwarf2read.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
Index: src/gdb/dwarf2read.c
===================================================================
--- src.orig/gdb/dwarf2read.c 2010-07-27 23:17:19.000000000 +0100
+++ src/gdb/dwarf2read.c 2010-07-27 23:17:31.000000000 +0100
@@ -923,7 +923,7 @@ static LONGEST read_offset_1 (bfd *, gdb
static gdb_byte *read_n_bytes (bfd *, gdb_byte *, unsigned int);
-static char *read_string (bfd *, gdb_byte *, unsigned int *);
+static char *read_direct_string (bfd *, gdb_byte *, unsigned int *);
static char *read_indirect_string (bfd *, gdb_byte *,
const struct comp_unit_head *,
@@ -3949,7 +3949,7 @@ skip_one_die (gdb_byte *buffer, gdb_byte
info_ptr += 8;
break;
case DW_FORM_string:
- read_string (abfd, info_ptr, &bytes_read);
+ read_direct_string (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
case DW_FORM_sec_offset:
@@ -8546,7 +8546,7 @@ read_attribute_value (struct attribute *
info_ptr += bytes_read;
break;
case DW_FORM_string:
- DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read);
+ DW_STRING (attr) = read_direct_string (abfd, info_ptr, &bytes_read);
DW_STRING_IS_CANONICAL (attr) = 0;
info_ptr += bytes_read;
break;
@@ -8894,7 +8894,7 @@ read_n_bytes (bfd *abfd, gdb_byte *buf,
}
static char *
-read_string (bfd *abfd, gdb_byte *buf, unsigned int *bytes_read_ptr)
+read_direct_string (bfd *abfd, gdb_byte *buf, unsigned int *bytes_read_ptr)
{
/* If the size of a host char is 8 bits, we can return a pointer
to the string, otherwise we have to copy the string to a buffer
@@ -9320,7 +9320,7 @@ dwarf_decode_line_header (unsigned int o
}
/* Read directory table. */
- while ((cur_dir = read_string (abfd, line_ptr, &bytes_read)) != NULL)
+ while ((cur_dir = read_direct_string (abfd, line_ptr, &bytes_read)) != NULL)
{
line_ptr += bytes_read;
add_include_dir (lh, cur_dir);
@@ -9328,7 +9328,7 @@ dwarf_decode_line_header (unsigned int o
line_ptr += bytes_read;
/* Read file name table. */
- while ((cur_file = read_string (abfd, line_ptr, &bytes_read)) != NULL)
+ while ((cur_file = read_direct_string (abfd, line_ptr, &bytes_read)) != NULL)
{
unsigned int dir_index, mod_time, length;
@@ -9535,7 +9535,7 @@ dwarf_decode_lines (struct line_header *
char *cur_file;
unsigned int dir_index, mod_time, length;
- cur_file = read_string (abfd, line_ptr, &bytes_read);
+ cur_file = read_direct_string (abfd, line_ptr, &bytes_read);
line_ptr += bytes_read;
dir_index =
read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
@@ -12879,7 +12879,7 @@ dwarf_decode_macros (struct line_header
read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
- read_string (abfd, mac_ptr, &bytes_read);
+ read_direct_string (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
}
break;
@@ -12910,7 +12910,7 @@ dwarf_decode_macros (struct line_header
read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
- read_string (abfd, mac_ptr, &bytes_read);
+ read_direct_string (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
}
break;
@@ -12965,7 +12965,7 @@ dwarf_decode_macros (struct line_header
line = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
- body = read_string (abfd, mac_ptr, &bytes_read);
+ body = read_direct_string (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
if (! current_file)
@@ -13071,7 +13071,7 @@ dwarf_decode_macros (struct line_header
constant = read_unsigned_leb128 (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
- string = read_string (abfd, mac_ptr, &bytes_read);
+ string = read_direct_string (abfd, mac_ptr, &bytes_read);
mac_ptr += bytes_read;
/* We don't recognize any vendor extensions. */