Skip to content

Add debug info tests#4798

Closed
bleibig wants to merge 1 commit intorust-lang:incomingfrom
bleibig:incoming
Closed

Add debug info tests#4798
bleibig wants to merge 1 commit intorust-lang:incomingfrom
bleibig:incoming

Conversation

@bleibig
Copy link
Contributor

@bleibig bleibig commented Feb 5, 2013

Fix for issue 2195.

The testing procedure mimics the way clang/llvm does their debuginfo tests - it creates a debugging commands script from directives in the header file which gdb runs in batch mode with the executable, and then checks if output is as expected. I have two very simple tests included, and they're both ignored because rust doesn't seem to emit good enough symbols for them to pass (by the way, I'll see if I can help fix that).

Note that once debug info tests are enabled, gdb will become a dependency for 'make check'.

@brson
Copy link
Contributor

brson commented Feb 5, 2013

swoon @bleibig, my hero!

@jdm
Copy link
Contributor

jdm commented Feb 5, 2013

!!!!!!!!!!!!!!!!!!!!!!!!

@jdm
Copy link
Contributor

jdm commented Feb 5, 2013

The reason the symbols aren't generated is that I hid anything beyond line number information behind the --xg flag. Variable symbol information tends to cause ICEs for non-trivial programs, since the full set of Rust types is not yet implemented.

@graydon
Copy link
Contributor

graydon commented Feb 8, 2013

Unfortunately this has diverged from trunk a bit an can't be merged anymore; any chance you can refresh it?

@bleibig
Copy link
Contributor Author

bleibig commented Feb 9, 2013

I'm not really the best with git and couldn't find a clean way to do that, so I just created a new pull request here.

@bleibig bleibig closed this Feb 9, 2013
flip1995 pushed a commit to flip1995/rust that referenced this pull request Apr 7, 2022
Add `crate_in_macro_def` lint

This PR adds a lint to check for `crate` as opposed to `$crate` used in a macro definition.

I think this can close rust-lang#4798. That issue focused on the case where the macro author "imports something into said macro."

But I think use of `crate` is likely to be a bug whether it appears in a `use` statement or not. There could be some use case I am failing to see, though. (cc: `@nilscript` `@flip1995)`

changelog: `crate_in_macro_def`
RalfJung added a commit to RalfJung/rust that referenced this pull request Jan 4, 2026
native lib support: support returning structs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments