diff options
| author | P1start <rewi-github@whanau.org> | 2015-01-22 20:12:57 +1300 |
|---|---|---|
| committer | P1start <rewi-github@whanau.org> | 2015-02-04 15:32:59 +1300 |
| commit | cfe18fb83627859e1730d31ae9126c494077c3ba (patch) | |
| tree | 1266dae00df76082b84526d892892f3b3fd4fe1c /src/libstd/sys | |
| parent | 7858cb432d3f2efc0374424cb2b51518f697c172 (diff) | |
| download | rust-cfe18fb83627859e1730d31ae9126c494077c3ba.tar.gz rust-cfe18fb83627859e1730d31ae9126c494077c3ba.zip | |
Fix Unicode name mangling
`{` and `}` aren’t valid characters on ARM.
This also fixes a small bug where `)` (**r**ight **p**arenthesis) and `*`
(**r**aw **p**ointer) would both mangle to `$RP$`, making `)` show up as `*` in
backtraces.
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/common/backtrace.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libstd/sys/common/backtrace.rs b/src/libstd/sys/common/backtrace.rs index a71676c6bf2..50a9f204799 100644 --- a/src/libstd/sys/common/backtrace.rs +++ b/src/libstd/sys/common/backtrace.rs @@ -107,9 +107,8 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> { // see src/librustc/back/link.rs for these mappings demangle! ( "$SP$", => "@", - "$UP$", => "Box", - "$RP$", => "*", - "$BP$", => "&", + "$BP$", => "*", + "$RF$", => "&", "$LT$", => "<", "$GT$", => ">", "$LP$", => "(", @@ -118,10 +117,11 @@ pub fn demangle(writer: &mut Writer, s: &str) -> IoResult<()> { // in theory we can demangle any Unicode code point, but // for simplicity we just catch the common ones. - "$u{20}", => " ", - "$u{27}", => "'", - "$u{5b}", => "[", - "$u{5d}", => "]" + "$u7e$", => "~", + "$u20$", => " ", + "$u27$", => "'", + "$u5b$", => "[", + "$u5d$", => "]" ) } else { let idx = match rest.find('$') { |
