Commit | Line | Data |
---|---|---|
01e1a5bc NC |
1 | #define TE_VMS |
2 | #include "obj-format.h" | |
3 | ||
4 | extern int vms_file_stats_name (const char *, long long *, long *, char *, int *); | |
5 | ||
6 | /* VMS debugger expects a separator. */ | |
7 | #define DWARF2_DIR_SHOULD_END_WITH_SEPARATOR 1 | |
8 | ||
9 | /* VMS debugger needs the file timestamp. */ | |
10 | #define DWARF2_FILE_TIME_NAME(FILENAME,DIRNAME) \ | |
11 | ({ \ | |
12 | long long cdt; \ | |
13 | char *filename = (char *) alloca (strlen (FILENAME) + strlen (DIRNAME) + 1);\ | |
14 | strcpy (filename, DIRNAME); \ | |
15 | strcat (filename, FILENAME); \ | |
16 | ((vms_file_stats_name (filename, &cdt, 0, 0, 0) == 0) ? cdt : 0); \ | |
17 | }) | |
18 | ||
19 | /* VMS debugger needs the file size. */ | |
20 | #define DWARF2_FILE_SIZE_NAME(FILENAME,DIRNAME) \ | |
21 | ({ \ | |
22 | long siz; \ | |
23 | char *filename = (char *) alloca (strlen (FILENAME) + strlen (DIRNAME) + 1);\ | |
24 | strcpy (filename, DIRNAME); \ | |
25 | strcat (filename, FILENAME); \ | |
26 | ((vms_file_stats_name (filename, 0, &siz, 0, 0) == 0) ? siz : 0); \ | |
27 | }) | |
28 | ||
29 | /* VMS debugger needs the filename with version appended. */ | |
30 | /* Longest filename on VMS is 255 characters. Largest version is 32768. */ | |
31 | #define DWARF2_FILE_NAME(FILENAME,DIRNAME) \ | |
32 | ({ \ | |
33 | int ver; \ | |
34 | char buff [255 + 7]; \ | |
35 | char *filename = (char *) alloca (strlen (FILENAME) + strlen (DIRNAME) + 1);\ | |
36 | strcpy (filename, DIRNAME); \ | |
37 | strcat (filename, FILENAME); \ | |
38 | vms_file_stats_name (filename, 0, 0, 0, &ver); \ | |
39 | snprintf (buff, 255 + 7, "%s;%d", FILENAME, ver); \ | |
40 | buff; \ | |
41 | }) | |
42 |