From: Uwe B. <ou...@ma...> - 2019-04-10 13:03:03
Attachments:
smime.p7s
|
Last function should be (defun my-gud-remove-breakpoint-with-icons () (interactive) (gud-remove 1) (gdb-remove-breakpoint-icons (line-beginning-position) (line-end-position))) |
From: Uwe B. <ou...@ma...> - 2019-04-12 16:10:57
Attachments:
smime.p7s
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: Hi Eric, Thanks for you reply. > Hi Uwe, > Looks like you were having some fun with the GUD API. :) > The type of snippets you forwarded look like they could work, though I > didn't try them. My assumption was that if users started using a > feature like you describe, and and typed: > dbclear all > or > dbstop in foo > and icons didn't appear/disappear correctly then they would send bug > reports. As long as it's clear that you have to use the EMACS > commands to set/remove breakpoints, then maybe that's ok. Right point taken. To defend myself: For ages I used Xemacs, whose matlab support was never at pair with GNU emacs, so I used the matlab-shell debugging. When I switched finally to GNU emacs, I could only enjoy the nice navigation while debugging for a short while, since the Matlab API was dropped basically a short while after I switched. (in 2011A or B, right?). So I, again, switched to the debugging from the command line, which is functional but not very convenient. Now thanks to Odd Andersen, Emacs navigation, in bit simplified form, during debugging is back and I would like to use Emacs and not the matlab-shell, so it simply did not occur to me that people could run into the problem you mentioned. So you are right: I should adapt the documentation accordingly. So what do you say: shall I do that and provide a patch to the list, to see what others say? (So far you are the only one who gave some feedback. > If you're feeling adventurous, a matlab script in matlab-emacs/toolbox > that uses 'dbstatus' and prints out a formatted list of breakpoints > could be used to 'fix up' the breakpoint icons. Shadows scripts for > dbclear and dbstop that call said script could probably get something > kindof hacky up and running for keeping icons up to date. This would > require some new output filter/parsing to get going. Could be a fun > project. Right, that sounds like a good idea. However till the end of May I will be busy debugging a lot of students programs so I might not find the time to do it. Any other takers? Regards Uwe |
From: Eric L. <eri...@gm...> - 2019-04-16 00:45:17
|
Hi Uwe, I'm not very familiar with those APIs. Do all the icons auto clean up when the GUD process goes away? If so, it seems like a fine thing to include to me. Eric On 4/12/19 12:10 PM, Uwe Brauer wrote: >>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Hi Eric, > > Thanks for you reply. > > > Hi Uwe, > > Looks like you were having some fun with the GUD API. :) > > > The type of snippets you forwarded look like they could work, though I > > didn't try them. My assumption was that if users started using a > > feature like you describe, and and typed: > > > dbclear all > > > or > > > dbstop in foo > > > and icons didn't appear/disappear correctly then they would send bug > > reports. As long as it's clear that you have to use the EMACS > > commands to set/remove breakpoints, then maybe that's ok. > > Right point taken. > > To defend myself: For ages I used Xemacs, whose matlab support was never > at pair with GNU emacs, so I used the matlab-shell debugging. When I > switched finally to GNU emacs, I could only enjoy the nice navigation > while debugging for a short while, since the Matlab API was dropped > basically a short while after I switched. (in 2011A or B, right?). > > So I, again, switched to the debugging from the command line, which is > functional but not very convenient. Now thanks to Odd Andersen, Emacs > navigation, in bit simplified form, during debugging is back and I would > like to use Emacs and not the matlab-shell, so it simply did not occur > to me that people could run into the problem you mentioned. So you are > right: I should adapt the documentation accordingly. > > So what do you say: shall I do that and provide a patch to the list, to > see what others say? (So far you are the only one who gave some > feedback. > > > If you're feeling adventurous, a matlab script in matlab-emacs/toolbox > > that uses 'dbstatus' and prints out a formatted list of breakpoints > > could be used to 'fix up' the breakpoint icons. Shadows scripts for > > dbclear and dbstop that call said script could probably get something > > kindof hacky up and running for keeping icons up to date. This would > > require some new output filter/parsing to get going. Could be a fun > > project. > > Right, that sounds like a good idea. However till the end of May I will > be busy debugging a lot of students programs so I might not find the > time to do it. Any other takers? > > Regards > > > > Uwe |
From: Eric L. <eri...@gm...> - 2019-04-12 12:44:20
|
Hi Uwe, Looks like you were having some fun with the GUD API. :) The type of snippets you forwarded look like they could work, though I didn't try them. My assumption was that if users started using a feature like you describe, and and typed: dbclear all or dbstop in foo and icons didn't appear/disappear correctly then they would send bug reports. As long as it's clear that you have to use the EMACS commands to set/remove breakpoints, then maybe that's ok. If you're feeling adventurous, a matlab script in matlab-emacs/toolbox that uses 'dbstatus' and prints out a formatted list of breakpoints could be used to 'fix up' the breakpoint icons. Shadows scripts for dbclear and dbstop that call said script could probably get something kindof hacky up and running for keeping icons up to date. This would require some new output filter/parsing to get going. Could be a fun project. Enjoy Eric On 4/10/19 9:02 AM, Uwe Brauer wrote: > Last function should be > > > > (defun my-gud-remove-breakpoint-with-icons () > (interactive) > (gud-remove 1) > (gdb-remove-breakpoint-icons (line-beginning-position) (line-end-position))) > > |
From: Uwe B. <ou...@ma...> - 2019-04-21 08:50:02
Attachments:
smime.p7s
|
>>> "EL" == Eric Ludlam <eri...@gm...> writes: Hi Eric > Hi Uwe, > I'm not very familiar with those APIs. Do all the icons auto clean up > when the GUD process goes away? Sorry for the delay. I am not sure I understand your question. Do you mean: when I run dbquit or dbclear from the command line, the icons should disappear? The answer to this is NO. Function one, sets in Emacs a breakpoint and a icon Function two, removes in Emacs the breakpoint and the icon. And that works only in Emacs not in the matlab shell. I could write a function, which would remove breakpoints and icons region wise, or for the whole buffer, if that were necessary. Uwe |
From: Eric L. <eri...@gm...> - 2019-04-21 22:23:54
|
On 4/21/19 4:49 AM, Uwe Brauer wrote: >>>> "EL" == Eric Ludlam <eri...@gm...> writes: > Hi Eric > > > > Hi Uwe, > > I'm not very familiar with those APIs. Do all the icons auto clean up > > when the GUD process goes away? > > Sorry for the delay. I am not sure I understand your question. > > Do you mean: when I run dbquit or dbclear from the command line, the > icons should disappear? > > The answer to this is NO. > > Function one, sets in Emacs a breakpoint and a icon > Function two, removes in Emacs the breakpoint and the icon. > And that works only in Emacs not in the matlab shell. > > > I could write a function, which would remove breakpoints and icons > region wise, or for the whole buffer, if that were necessary. Sorry, I meant when the MATLAB process goes away, does GUD know to clean up the breakpoint icons along with the process. It sounds like it is just with the commands which seems like a fine start. Eric |
From: Uwe B. <ou...@ma...> - 2019-04-22 07:16:46
Attachments:
smime.p7s
|
> On 4/21/19 4:49 AM, Uwe Brauer wrote: > Sorry, I meant when the MATLAB process goes away, does GUD know to > clean up the breakpoint icons along with the process. No it does not. I did not check this before thanks for pointing it out. So the breakpoint is gone, since matlab is finished, but the icon stays. I have to close and reopen the file. It gets worse. If I don't kill the Matlab process, close and reopen the file, the icon is gone, but the breakpoint is still set. Well so I think I will not include that function in matlab, it will be too confusing. If I come up with a better more robust solution I will reconsider it. Uwe |