Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D dynamorio
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,467
    • Issues 1,467
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 44
    • Merge requests 44
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • DynamoRIO
  • dynamorio
  • Issues
  • #605
Closed
Open
Issue created Nov 28, 2014 by Derek Bruening@derekbrueningContributor

drsyms: expose type information for symbols, particularly things like argument types and sizes

From rnk@google.com on November 11, 2011 11:26:20

Our use case in DrMemory is that we have an application that creates overloads for strlen(wchar_t ) as well as other str routines to call wcslen on Windows. DrM gets horribly confused when it tries to intercept these string routines, because it assumes they take char*s. https://code.google.com/p/drmemory/issues/detail?id=682 We could attempt to get the type info from the mangled names, but I don't think it will always be there. For example, we could have the following: static size_t strlen(wchar_t *s) { return wcslen(s); }

I think this is valid C++. It creates an overload for strlen(wchar_t*), but it's static, meaning TU-private, so the compiler is not obligated to emit a decorated name. It can use whatever name it feels like, and this is the problem we had implementing issue #588 (closed) . Public syms are decorated, but private syms are not. Therefore, it may be more reliable to rely on the type information present in full PDBs (ie not stripped to public syms only).

There's a good article here on how to get type info out of dbghelp: http://www.debuginfo.com/articles/dbghelptypeinfo.html Both Windows and Linux seem to have similar models for debug info. You start by looking up a symbol and getting some cursor, which is a offset into some binary tag soup. You query it with the debug info routines, which give you more cursors to other tags with more attributes. Eventually, after you sift through function types and typedefs and things, you can get down to a base type with a canonical name and size.

Original issue: http://code.google.com/p/dynamorio/issues/detail?id=605

Assignee
Assign to
Time tracking