Subversion Repositories Games.Carmageddon

Rev

Rev 8 | Rev 14 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8 Rev 11
Line 58... Line 58...
58
    return dethrace_dl_data.start;
58
    return dethrace_dl_data.start;
59
}
59
}
60
 
60
 
61
// Resolve symbol name and source location given the path to the executable and an address
61
// Resolve symbol name and source location given the path to the executable and an address
62
int addr2line(char const* const program_name, void const* const addr) {
62
int addr2line(char const* const program_name, void const* const addr) {
63
    char addr2line_cmd[512] = { 0 };
63
    char addr2line_cmd[512];
64
 
64
 
65
    /* have addr2line map the address to the related line in the code */
65
    /* have addr2line map the address to the related line in the code */
66
    sprintf(addr2line_cmd, "addr2line -f -p -e \"%s\" %p", program_name, addr - get_dethrace_offset()); // Pierre-Marie Baty -- support pathnames containing spaces
66
    sprintf(addr2line_cmd, "addr2line -f -p -e \"%s\" %p", program_name, addr - get_dethrace_offset()); // Pierre-Marie Baty -- support pathnames containing spaces
67
 
67
 
68
    fprintf(stderr, "%d: ", stack_nbr++);
68
    fprintf(stderr, "%d: ", stack_nbr++);
Line 259... Line 259...
259
            f = fopen(pDirName, mode);
259
            f = fopen(pDirName, mode);
260
            break;
260
            break;
261
        }
261
        }
262
    }
262
    }
263
    closedir(pDir);
263
    closedir(pDir);
-
 
264
    if (f == NULL) {
-
 
265
        fprintf(stderr, "Failed to open \"%s\" (%s)\n", pathname, strerror(errno));
-
 
266
    }
264
    return f;
267
    return f;
265
}
268
}
266
 
269
 
267
size_t OS_ConsoleReadPassword(char* pBuffer, size_t pBufferLen) {
270
size_t OS_ConsoleReadPassword(char* pBuffer, size_t pBufferLen) {
268
    struct termios old, new;
271
    struct termios old, new;