Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 991800 Details for
Bug 1192742
Fix DWARF for variable references
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh109 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
Migrated Products
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
A bit hacky fix
reference.patch (text/plain), 2.53 KB, created by
Jan Kratochvil
on 2015-02-14 22:12:33 UTC
(
hide
)
Description:
A bit hacky fix
Filename:
MIME Type:
Creator:
Jan Kratochvil
Created:
2015-02-14 22:12:33 UTC
Size:
2.53 KB
patch
obsolete
>diff -dup -rup go-orig/src/cmd/ld/dwarf.c go/src/cmd/ld/dwarf.c >--- go-orig/src/cmd/ld/dwarf.c 2015-02-14 21:47:05.287354436 +0100 >+++ go/src/cmd/ld/dwarf.c 2015-02-14 22:37:25.634683838 +0100 >@@ -180,6 +180,7 @@ enum > DW_ABRV_IFACETYPE, > DW_ABRV_MAPTYPE, > DW_ABRV_PTRTYPE, >+ DW_ABRV_REFTYPE, > DW_ABRV_BARE_PTRTYPE, // only for void*, no DW_AT_type attr to please gdb 6. > DW_ABRV_SLICETYPE, > DW_ABRV_STRINGTYPE, >@@ -344,6 +345,14 @@ static struct DWAbbrev { > DW_AT_go_kind, DW_FORM_data1, > 0, 0 > }, >+ /* REFTYPE */ >+ { >+ DW_TAG_reference_type, DW_CHILDREN_no, >+ DW_AT_name, DW_FORM_string, >+ DW_AT_type, DW_FORM_ref_addr, >+ DW_AT_go_kind, DW_FORM_data1, >+ 0, 0 >+ }, > /* BARE_PTRTYPE */ > { > DW_TAG_pointer_type, DW_CHILDREN_no, >@@ -913,9 +922,11 @@ dotypedef(DWDie *parent, char *name, DWD > newrefattr(die, DW_AT_type, def); > } > >+static DWDie* defgotype(LSym *gotype); >+ > // Define gotype, for composite ones recurse into constituents. > static DWDie* >-defgotype(LSym *gotype) >+defgotype_ref(LSym *gotype, int is_ref) > { > DWDie *die, *fld; > LSym *s; >@@ -932,10 +943,19 @@ defgotype(LSym *gotype) > return find_or_diag(&dwtypes, "<unspecified>"); > } > name = gotype->name + 5; // could also decode from Type.string >+ if (is_ref) { >+ // NAME must not match its !is_ref counterpart. >+ char namebuf[1024]; >+ snprint(namebuf, sizeof namebuf, "&(%s)", name); >+ name = estrdup(namebuf); >+ } > > die = find(&dwtypes, name); >- if (die != nil) >+ if (die != nil) { >+ if (is_ref) >+ free(name); > return die; >+ } > > if (0 && debug['v'] > 2) > print("new type: %Y\n", gotype); >@@ -1045,7 +1065,7 @@ defgotype(LSym *gotype) > break; > > case KindPtr: >- die = newdie(&dwtypes, DW_ABRV_PTRTYPE, name); >+ die = newdie(&dwtypes, (is_ref ? DW_ABRV_REFTYPE : DW_ABRV_PTRTYPE), name); > dotypedef(&dwtypes, name, die); > s = decodetype_ptrelem(gotype); > newrefattr(die, DW_AT_type, defgotype(s)); >@@ -1095,6 +1115,12 @@ defgotype(LSym *gotype) > return die; > } > >+static DWDie* >+defgotype(LSym *gotype) >+{ >+ return defgotype_ref(gotype, 0); >+} >+ > // Find or construct *T given T. > static DWDie* > defptrto(DWDie *dwtype) >@@ -1681,9 +1707,9 @@ writelines(void) > if (nn) > n = nn + 1; > >- dwvar = newdie(dwfunc, dt, n); >+ dwvar = newdie(dwfunc, dt, n + (*n == '&')); > newcfaoffsetattr(dwvar, offs); >- newrefattr(dwvar, DW_AT_type, defgotype(a->gotype)); >+ newrefattr(dwvar, DW_AT_type, defgotype_ref(a->gotype, (*n == '&'))); > > // push dwvar down dwfunc->child to preserve order > newattr(dwvar, DW_AT_internal_location, DW_CLS_CONSTANT, offs, nil);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1192742
: 991800