User forums > Using Code::Blocks

GDB

<< < (4/8) > >>

oBFusCATed:
Have you tried to execute:

--- Code: ---shell avarice -g -j USB -P $(MCU) -j usb localhost:4242
--- End code ---

Is this on windows?
And what is $(MCU) ?


--- Quote from: scarphin on February 11, 2011, 05:09:39 pm ---I still don't understand why the 'additional shell commands' can't have the same implementation like the 'Tools' menu?

--- End quote ---
Because it is easier to just remove them :)

scarphin:

--- Quote from: oBFusCATed on February 11, 2011, 08:29:38 pm ---Have you tried to execute:

--- Code: ---shell avarice -g -j USB -P $(MCU) -j usb localhost:4242
--- End code ---

--- End quote ---
Yes I've tried to execute every possible combination. With quotes, without quotes, with full path, without full path, some other executables like winamp etc... just to make sure that it isn't implemented as it's expressed on the link I posted on my previous post.


--- Quote from: oBFusCATed on February 11, 2011, 08:29:38 pm ---Is this on windows?
And what is $(MCU) ?

--- End quote ---
Yup windows, tried on both XP SP3 and Vista SP1. $(MCU) is a variable loaded with the target microcontroller type upon the execution of the AVR project template which I inserted into the template. It works fine on the tools menu and other things where needed.


--- Quote from: oBFusCATed on February 11, 2011, 08:29:38 pm ---
--- Quote from: scarphin on February 11, 2011, 05:09:39 pm ---I still don't understand why the 'additional shell commands' can't have the same implementation like the 'Tools' menu?

--- End quote ---
Because it is easier to just remove them :)

--- End quote ---
Doesn't compute! Remove what? Even though 'shell' gets implemented some day to AVR-gdb, there are other mcus on the market which have their own gdb servers and if they don't also support 'shell' that makes codeblocks inattractive imo if 'additional shell commands' won't be implemented. And I still think implementing them with just the same functionality of the 'tools' menu would be more than enough for now. Can the 'tools' menu code just copied and pasted with little modification to implement them?

oBFusCATed:

--- Quote from: scarphin on February 11, 2011, 11:37:32 pm ---Yes I've tried to execute every possible combination. With quotes, without quotes, with full path, without full path, some other executables like winamp etc... just to make sure that it isn't implemented as it's expressed on the link I posted on my previous post.

--- End quote ---
Can you post a quote from the link, because there is no mention of shell in it. And as you can see here it looks pretty much as the normal gdb man page: http://linux.die.net/man/1/gdb


--- Quote from: scarphin on February 11, 2011, 11:37:32 pm ---Can the 'tools' menu code just copied and pasted with little modification to implement them?

--- End quote ---
I've intended to to remove the additional shell commands or implement them using the gdb shell command.
Can you try something:
1. Start a debug session and break on some breakpoint
2. In combo where gdb commands can be executed type "shell dir" and execute the command
3. Paste the output here

If the shell command doesn't work everywhere probably I can use the tools code.

scarphin:

--- Quote from: oBFusCATed on February 12, 2011, 12:56:27 am ---
--- Quote from: scarphin on February 11, 2011, 11:37:32 pm ---Yes I've tried to execute every possible combination. With quotes, without quotes, with full path, without full path, some other executables like winamp etc... just to make sure that it isn't implemented as it's expressed on the link I posted on my previous post.

--- End quote ---
Can you post a quote from the link, because there is no mention of shell in it. And as you can see here it looks pretty much as the normal gdb man page: http://linux.die.net/man/1/gdb

--- End quote ---

Sry my bad, I thought it wasn't implemented because there was no mention of it but it seems it's implemented.


--- Quote from: oBFusCATed on February 12, 2011, 12:56:27 am ---I've intended to to remove the additional shell commands or implement them using the gdb shell command.
Can you try something:
1. Start a debug session and break on some breakpoint
2. In combo where gdb commands can be executed type "shell dir" and execute the command
3. Paste the output here

--- End quote ---

Ok, 'shell' works when executed as a gdb command during a debugging session but I couldn't manage to make it work through the 'additional gdb commands'. It just doesn't execute the command. I also tried it with a mingw project and it works with mingw-gdb either way but with avr-gdb, it only works when typed in and executed as a gdb command. Even though if it works somehow I have some concerns regarding this implementation.
1. This will be a VERY VERY VERY debugger specific implementation. How will it be when other debuggers without shell support will be supported by codeblocks?
2. Will it be as useful as 'tools' menu item (like piping, macros and other things)?
3. It will be a clear implementation to use 'additional shell commands' instead of 'additional gdb commands' in my opinion.


--- Quote from: oBFusCATed on February 12, 2011, 12:56:27 am ---If the shell command doesn't work everywhere probably I can use the tools code.

--- End quote ---

Please implement it like 'tools' menu to make it future proof. ;)

oBFusCATed:
scarphin: Keep in mind that the GUI in the project -> properties is added by the GDB plugin itself and it is not common for all plugins.
  So other plugins should implement it the best they can.

Have you looked at the debugger's debug log when using avr-gdb? Also I think you should use the debuggers branch, in trunk the commands weren't working if I remember correctly.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version