aboutsummaryrefslogtreecommitdiff
path: root/gas/dwarf2dbg.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2009-01-15 12:42:52 +0000
committerNick Clifton <nickc@redhat.com>2009-01-15 12:42:52 +0000
commit01e1a5bc1257af9e193d00fd4dce10fa3f1f3d75 (patch)
treeb610f2fb9a65f5349579a727e8e8ffa5e8af7e6f /gas/dwarf2dbg.c
parentbc2d180888f7f4efabce7eccf95088a540bc4fcb (diff)
downloadgdb-01e1a5bc1257af9e193d00fd4dce10fa3f1f3d75.zip
gdb-01e1a5bc1257af9e193d00fd4dce10fa3f1f3d75.tar.gz
gdb-01e1a5bc1257af9e193d00fd4dce10fa3f1f3d75.tar.bz2
* include/elf/ia64.h (SHT_IA_64_VMS_DISPLAY_NAME_INFO,
EF_IA_64_ARCHVER_1): New macros. Minor reformatting. * bfd/Makefile.am (BFD32_BACKENDS): Add new object vmsutil.lo (BFD32_BACKENDS_CFILES): Add new file vmsutil.c (vmsutil.lo): Add dependency rule * bfd/Makefile.in: Regenerate * bfd/config.bfd (ia64*-*-*vms*): Add case. * bfd/configure.in (bfd_elf64_ia64_vms_vec): Add case. * bfd/configure: Regenerate * bfd/vmsutil.[ch]: New files * bfd/elf-bfd.h (struct bfd_elf_special_section): Change type of attr to bfd_vma. * bfd/elfxx-ia64.c (elfNN_vms_post_process_headers, elfNN_vms_section_processing, elfNN_vms_final_write_processing, elfNN_vms_close_and_cleanup, elfNN_vms_section_from_shdr, elfNN_vms_object_p): New functions * bfd/targets.c (bfd_elf64_ia64_vms_vec): New target. * gas/configure.tgt(ia64-*-*vms*): New target. * gas/dwarf2dbg.h (dwarf2_loc_mark_labels): Make extern. * gas/tc.h (md_number_to_chars): Declare iff undefined. * gas/config/obj-elf.c (obj_elf_change_section): Change type of arg attr to bfd_vma. (obj_elf_parse_section_letters): Return a bfd_vma. Change type of variables attr, md_attr to bfd_vma. (obj_elf_section_word): Likewise. (obj_elf_section): Change type of variable attr to bfd_vma * gas/config/obj-elf.h (obj_elf_change_section): Change type of arg attr to bfd_vma * gas/config/tc-ia64.c (bfdver.h,time.h): Include. (ia64_elf_section_letter): Now returns a bfd_vma. Handle VMS specific attributes. (ia64_elf_section_flags): Arg attr now a bfd_vma. (ia64_init): Don't turn on dependency checking for VMS. (ia64_target_format): Check for VMS flag bit. (do_alias): Hande decc$ functions. (get_vms_time): New function. (ia64_vms_note): New function. * gas/config/tc-ia64.h (ia64_elf_section_letter): Now returns a bfd_vma. (ia64_elf_section_flags): Arg attr now a bfd_vma. (tc_init_after_args): Define for VMS. * gas/config/tc-alpha.c (alpha_elf_section_letter): Return a bfd_vma. (alpha_elf_section_flags): Change type of arg attr to bfd_vma. * gas/config/tc-alpha.h: Likewise. * gas/config/tc-i386.c (x86_64_section_letter): Return a bfd_vma. (x86_64_section_word): Return a bfd_vma. * gas/config/tc-i386.h: Likewise. * gas/config/tc-ip2k.c (ip2k_elf_section_flags): Change type of arg attr to bfd_vma. * gas/config/tc-ip2k.h: Likewise. * gas/config/tc-mep.c (mep_elf_section_letter): Return a bfd_vma. (mep_elf_section_flags): Change type of arg attr to bfd_vma. * gas/config/tc-mep.h: Likewise. * gas/config/tc-ppc.c (ppc_section_letter): Return a bfd_vma. (ppc_section_word): Return a bfd_vma. (ppc_section_flags): Change type of arg attr to bfd_vma. * gas/config/tc-ppc.h: Likewise. * gas/config/te-vms.h (DWARF2_DIR_SHOULD_END_WITH_SEPARATOR, DWAR2_FILE_TIME_NAME, DWARF2_FILE_SIZE_NAME, DWARF2_FILEN_NAME): New file with new macros * gas/dwarf2dbg.c (get_filenum, out_file_list): Default and call new macros.
Diffstat (limited to 'gas/dwarf2dbg.c')
-rw-r--r--gas/dwarf2dbg.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index b7857f2..2bcba9b 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -76,6 +76,18 @@
# define DWARF2_ADDR_SIZE(bfd) (bfd_arch_bits_per_address (bfd) / 8)
#endif
+#ifndef DWARF2_FILE_NAME
+#define DWARF2_FILE_NAME(FILENAME, DIRNAME) FILENAME
+#endif
+
+#ifndef DWARF2_FILE_TIME_NAME
+#define DWARF2_FILE_TIME_NAME(FILENAME,DIRNAME) 0
+#endif
+
+#ifndef DWARF2_FILE_SIZE_NAME
+#define DWARF2_FILE_SIZE_NAME(FILENAME,DIRNAME) 0
+#endif
+
#include "subsegs.h"
#include "elf/dwarf2.h"
@@ -434,7 +446,9 @@ get_filenum (const char *filename, unsigned int num)
dir = 0;
if (dir_len)
{
+#ifndef DWARF2_DIR_SHOULD_END_WITH_SEPARATOR
--dir_len;
+#endif
for (dir = 1; dir < dirs_in_use; ++dir)
if (strncmp (filename, dirs[dir], dir_len) == 0
&& dirs[dir][dir_len] == '\0')
@@ -1281,6 +1295,8 @@ out_file_list (void)
for (i = 1; i < files_in_use; ++i)
{
+ const char *fullfilename;
+
if (files[i].filename == NULL)
{
as_bad (_("unassigned file number %ld"), (long) i);
@@ -1289,13 +1305,19 @@ out_file_list (void)
continue;
}
- size = strlen (files[i].filename) + 1;
+ fullfilename = DWARF2_FILE_NAME (files[i].filename,
+ files[i].dir ? dirs [files [i].dir] : "");
+ size = strlen (fullfilename) + 1;
cp = frag_more (size);
- memcpy (cp, files[i].filename, size);
+ memcpy (cp, fullfilename, size);
out_uleb128 (files[i].dir); /* directory number */
- out_uleb128 (0); /* last modification timestamp */
- out_uleb128 (0); /* filesize */
+ /* Output the last modification timestamp. */
+ out_uleb128 (DWARF2_FILE_TIME_NAME (files[i].filename,
+ files[i].dir ? dirs [files [i].dir] : ""));
+ /* Output the filesize. */
+ out_uleb128 (DWARF2_FILE_SIZE_NAME (files[i].filename,
+ files[i].dir ? dirs [files [i].dir] : ""));
}
/* Terminate filename list. */