mirror of
https://github.com/netwide-assembler/nasm
synced 2026-08-26 16:23:04 -04:00
codeview: remove hack for handling local labels
Now when labels are properly concatenated in common code, there is no reason for the debugging backend to need to be aware of local symbols. We don't have to consider ..[^@] special symbols either, as they are now filtered in labels.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Debugged-by: Jim Kukunas <james.t.kukunas@linux.intel.com>
This commit is contained in:
parent
3def9fcb59
commit
bc42cbe363
1 changed files with 2 additions and 17 deletions
|
|
@ -188,8 +188,6 @@ static void cv8_linenum(const char *filename, int32_t linenumber,
|
|||
static void cv8_deflabel(char *name, int32_t segment, int64_t offset,
|
||||
int is_global, char *special)
|
||||
{
|
||||
int ret;
|
||||
size_t len;
|
||||
struct cv8_symbol *sym;
|
||||
struct coff_Section *s;
|
||||
|
||||
|
|
@ -214,21 +212,8 @@ static void cv8_deflabel(char *name, int32_t segment, int64_t offset,
|
|||
sym->size = 0;
|
||||
sym->typeindex = 0;
|
||||
|
||||
/* handle local labels */
|
||||
if (name[0] == '.' && cv8_state.last_sym != NULL) {
|
||||
len = strlen(cv8_state.last_sym->name) + strlen(name);
|
||||
sym->name = nasm_malloc(len + 1);
|
||||
ret = snprintf(sym->name, len + 1, "%s%s",
|
||||
cv8_state.last_sym->name, name);
|
||||
nasm_assert(ret > 0 && (size_t)ret == len);
|
||||
} else {
|
||||
len = strlen(name);
|
||||
sym->name = nasm_malloc(len + 1);
|
||||
ret = snprintf(sym->name, len + 1, "%s", name);
|
||||
nasm_assert(ret > 0 && (size_t)ret == len);
|
||||
}
|
||||
|
||||
cv8_state.symbol_lengths += len + 1;
|
||||
sym->name = nasm_strdup(name);
|
||||
cv8_state.symbol_lengths += strlen(sym->name) + 1;
|
||||
|
||||
if (cv8_state.last_sym && cv8_state.last_sym->section == segment)
|
||||
cv8_state.last_sym->size = offset - cv8_state.last_sym->secrel;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue