GDB: Extended functionality - #965
Conversation
lgirdwood
left a comment
There was a problem hiding this comment.
In general only the generic GDB code should exist in src/gdb. Anything that is xtensa specific (either C or assembler) must be in arch/xtensa/gdb and use a arch_gdb_ call prefix. This then makes the GDB code easily portable to other DSP architectures e.g ARM M4, Ceva Teaklite since only the arch_gdb_ APIs need to be implemented.
There was a problem hiding this comment.
Yes, I moved whole while loop max to the left on purpose - we have many switches which are sitting inside another switches and these switches are inside while loop, there are of cource ifs all around... so to meet the 80 characters MAX limit I would have to slice each line (it for sure won't improve code readability). Also keep in mind that after the move of xtensa specific stuff into arch/xtensa/gdb our write_sr function has become arch_gdb_write_sr(arg1, arg2); - it alone took 30 characters!
So the bottom line is, I would sacrifice this while(1){ indentation in this case.
There was a problem hiding this comment.
@lgirdwood @mrajwa
Move loop body to another function (may be static inline if you care about call performance penalty), then you'll keep indent of that part
There was a problem hiding this comment.
Imho still unresolved. Please change it.
|
@mrajwa few general comments:
So, for example: GDB: Added support for insert breakpoint. should be gdb: Add support for insert breakpoint |
|
@lgirdwood changes have been applied. Once this PR is merged people may use GDB. |
lgirdwood
left a comment
There was a problem hiding this comment.
Only some minor issues but can you squash the review comments into the earlier patches in this PR. Look forward to using GDB !
There was a problem hiding this comment.
intentional or can it be removed ?
There was a problem hiding this comment.
Can be removed and actually was in "cleanup" commit.
There was a problem hiding this comment.
"out of scope" is a more meaningful message if its correct ?
There was a problem hiding this comment.
Yes it is, however the error message must contain only HEX characters 0..F otherwise it may cause GDB to close the session.
There was a problem hiding this comment.
some magic numbers here that I dont know what they mean. Can we use macros
|
@lgirdwood should this be in 1.3? |
|
@mrajwa @michalgrodzicki we could do with this in 1.3, this would let the kernel guys add driver support. @cujomalainey already has some example kernel code but we need this to complete integration. |
|
@mrajwa @michalgrodzicki ping, this is very close to merge now. Can we get it to the finish line for 1.3 this week ? |
|
Here is the archived repo https://github.com/cujomalainey/cros-kernel |
|
@lgirdwood, sure I will update soon. |
|
@cujomalainey thanks. @plbossart @ranj063 see comment above for kernel GDB tunnel code. This will need integration into sof-dev kernel branch. |
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
|
@lgirdwood, update have been pushed, is there anything that you would still like to change/correct before merging it to master? PS: I do work with @ranj063 on preparing driver daemon for it. |
lgirdwood
left a comment
There was a problem hiding this comment.
This code is good but is still not portable. All xtensa specific code and macros need to be out of src/gdb/.
|
@lgirdwood I don't know. I made the update yesterday once and from that time haven't touched it. Also, the number of commits is exactly the same as it was before my yesterday update. |
There was a problem hiding this comment.
Imho still unresolved. Please change it.
|
@lgirdwood, its passing now, looks like temporary CI problem. |
|
@jajanusz @lgirdwood updated. |
There was a problem hiding this comment.
ret is always 1 here, no need to introduce new variable
|
@jajanusz updated. |
|
Weird that compiler didn't complain that there are exectution path without return value |
|
I just realized that you can do anything with GDB and it will pass CI because we don't test configs with CONFIG_GDB ... |
|
Seems to be OK now, @tlauda can you put your comment to? |
|
@mrajwa looks like we are waiting on CI completion too. |
Signed-off-by: Marcin Rajwa <marcin.rajwa@linux.intel.com>
|
@zrombel CI not running ? |
It's running but queue is long, as always on mondays |
Added support for following packets:
read/write memory