mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-24 20:28:28 +08:00
Fix to s_dmadata(), .EndDmaData was causing a trap.
This commit is contained in:
@ -910,8 +910,9 @@ s_dmadata( type)
|
|||||||
int type;
|
int type;
|
||||||
{
|
{
|
||||||
static short state = 0;
|
static short state = 0;
|
||||||
struct symbol *label; /* Points to symbol */
|
static symbolS *label; /* Points to symbol */
|
||||||
char *name, *name2; /* points to name of first / final symbol */
|
char *name;
|
||||||
|
const char *prevName;
|
||||||
int temp;
|
int temp;
|
||||||
|
|
||||||
switch( type) {
|
switch( type) {
|
||||||
@ -962,14 +963,14 @@ s_dmadata( type)
|
|||||||
*"label" points to beginning of block
|
*"label" points to beginning of block
|
||||||
* Create a name for the final label like _$<name>
|
* Create a name for the final label like _$<name>
|
||||||
*/
|
*/
|
||||||
name = label->bsym->name;
|
prevName = label->bsym->name;
|
||||||
temp = strlen( name) + 1;
|
temp = strlen( prevName) + 1;
|
||||||
name2 = malloc( temp + 2);
|
name = malloc( temp + 2);
|
||||||
name2[ 0] = '_';
|
name[ 0] = '_';
|
||||||
name2[ 1] = '$';
|
name[ 1] = '$';
|
||||||
memcpy( name2+2, name, temp); /* copy original name & \0 */
|
memcpy( name+2, prevName, temp); /* copy original name & \0 */
|
||||||
colon( name2);
|
colon( name);
|
||||||
free( name2);
|
free( name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user