Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is this gdb functionality supposed to work? #31

Open
nhed opened this issue Feb 5, 2019 · 3 comments
Open

Is this gdb functionality supposed to work? #31

nhed opened this issue Feb 5, 2019 · 3 comments

Comments

@nhed
Copy link

nhed commented Feb 5, 2019

I know i'm able to define macros in ~/.gdbinit (just not interactively using define from the crash prompt)

hoping to have a string comparison in such a macro using $_streq as per https://sourceware.org/gdb/onlinedocs/gdb/Convenience-Funs.html

When I have the test macro

define dotest
  if $_streq("1", "1")
    echo ok\n
  end
end

I observe different results between gdb and crash

(gdb) dotest
ok

vs

crash> dotest
You can't do that without a process to debug.
gdb: gdb request failed: dotest
@crash-utility
Copy link
Collaborator

crash-utility commented Feb 5, 2019 via email

@nhed
Copy link
Author

nhed commented Feb 5, 2019

but the gdb test I tested with was not attached to a running process either (launched just as $ gdb)

@crash-utility
Copy link
Collaborator

crash-utility commented Feb 5, 2019 via email

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

No branches or pull requests

1 participant