Commit 83c6acea authored by wujing's avatar wujing

Fix exit to exit_function for debugging abort issue

parent c80d2ec4
...@@ -689,14 +689,14 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -689,14 +689,14 @@ void rx_prach0(PHY_VARS_eNB *eNB,
LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1); LOG_M("prach_rxF_comp0.m","prach_rxF_comp0",prachF,1024,1,1);
LOG_M("Xu.m","xu",Xu,N_ZC,1,1); LOG_M("Xu.m","xu",Xu,N_ZC,1,1);
LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1); LOG_M("prach_ifft0.m","prach_t0",prach_ifft,1024,1,1);
exit(-1); exit_fun("rx_prach0 prach_ifft0.m" );
} else { } else {
LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb); LOG_E(PHY,"Dumping prach (br_flag %d), k = %d (n_ra_prb %d)\n",br_flag,k,n_ra_prb);
LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1); LOG_M("rxsigF_br.m","prach_rxF_br",&rxsigF[0][0],12288,1,1);
LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1); LOG_M("prach_rxF_comp0_br.m","prach_rxF_comp0_br",prachF,1024,1,1);
LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1); LOG_M("Xu_br.m","xu_br",Xu,N_ZC,1,1);
LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1); LOG_M("prach_ifft0_br.m","prach_t0_br",prach_ifft,1024,1,1);
exit(-1); exit_fun("rx_prach0 prach_ifft0_br.m" );
} }
} }
} /* LOG_DUMPFLAG(PRACH) */ } /* LOG_DUMPFLAG(PRACH) */
......
...@@ -743,7 +743,7 @@ void ru_fep_full_2thread(RU_t *ru) { ...@@ -743,7 +743,7 @@ void ru_fep_full_2thread(RU_t *ru) {
if (check_sync_pos >= 8 || check_sync_pos<=-8) { if (check_sync_pos >= 8 || check_sync_pos<=-8) {
LOG_E(PHY,"~~~~~~~~~~~~~~ check_sync_pos %d, frame %d ---> LOST SYNC-EXIT\n", check_sync_pos, proc->frame_rx); LOG_E(PHY,"~~~~~~~~~~~~~~ check_sync_pos %d, frame %d ---> LOST SYNC-EXIT\n", check_sync_pos, proc->frame_rx);
LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1); LOG_M("rxdata.m","rxdata",&ru->common.rxdata[0][0], fp->samples_per_tti*2,1,1);
exit(-1); exit_fun("ru_fep_full_2thread rxdata error" );
} }
} }
......
...@@ -613,7 +613,7 @@ pdcp_data_ind( ...@@ -613,7 +613,7 @@ pdcp_data_ind(
PROTOCOL_PDCP_CTXT_FMT"wrong sequence number (%d) for this pdcp entity \n", PROTOCOL_PDCP_CTXT_FMT"wrong sequence number (%d) for this pdcp entity \n",
PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p), PROTOCOL_PDCP_CTXT_ARGS(ctxt_pP, pdcp_p),
pdcp_p->seq_num_size); pdcp_p->seq_num_size);
exit(1); exit_fun("pdcp_data_ind wrong sequence number" );
} }
//uint8_t dc = pdcp_get_dc_filed((unsigned char*)sdu_buffer_pP->data); //uint8_t dc = pdcp_get_dc_filed((unsigned char*)sdu_buffer_pP->data);
...@@ -902,7 +902,8 @@ pdcp_data_ind( ...@@ -902,7 +902,8 @@ pdcp_data_ind(
default: default:
LOG_E(PDCP, "bad RLC mode, cannot happen.\n"); LOG_E(PDCP, "bad RLC mode, cannot happen.\n");
exit(1); exit_fun("pdcp_data_ind bad RLC mode, cannot happen" );
break;
} /* switch (pdcp_p->rlc_mode) */ } /* switch (pdcp_p->rlc_mode) */
} else { /* MBMS_flagP == 0 */ } else { /* MBMS_flagP == 0 */
payload_offset=0; payload_offset=0;
......
...@@ -362,7 +362,7 @@ rrc_rx_tx( ...@@ -362,7 +362,7 @@ rrc_rx_tx(
ue_context_p->ue_context.ue_release_timer_thres) { ue_context_p->ue_context.ue_release_timer_thres) {
LOG_I(RRC,"Removing UE %x instance (release timer %d)\n",ue_context_p->ue_context.rnti,ue_context_p->ue_context.ue_release_timer); LOG_I(RRC,"Removing UE %x instance (release timer %d)\n",ue_context_p->ue_context.rnti,ue_context_p->ue_context.ue_release_timer);
ue_to_be_removed = ue_context_p; ue_to_be_removed = ue_context_p;
exit(-1); //exit(-1);
break; break;
} }
} }
......
...@@ -1384,17 +1384,17 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1384,17 +1384,17 @@ uint8_t do_SIB23(uint8_t Mod_id,
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t)); memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_t));
} else { } else {
LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id); LOG_E(RRC,"[eNB %d] BCCH_MESSAGE is null, exiting\n", Mod_id);
exit(-1); exit_fun("do_SIB23 BCCH_MESSAGE is null" );
} }
if (!sib2) { if (!sib2) {
LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id); LOG_E(RRC,"[eNB %d] sib2 is null, exiting\n", Mod_id);
exit(-1); exit_fun("do_SIB23 sib2 is null" );
} }
if (!sib3) { if (!sib3) {
LOG_E(RRC,"[eNB %d] sib3 is null, exiting\n", Mod_id); LOG_E(RRC,"[eNB %d] sib3 is null, exiting\n", Mod_id);
exit(-1); exit_fun("do_SIB23 sib3 is null" );
} }
......
...@@ -312,7 +312,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id, ...@@ -312,7 +312,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
{ {
//FIXME in NB-IoT mandatory to be FDD --> so must give an error //FIXME in NB-IoT mandatory to be FDD --> so must give an error
LOG_E(RRC,"[NB-IoT %d] Frame Type is TDD --> not supported by NB-IoT, exiting\n", Mod_id); //correct? LOG_E(RRC,"[NB-IoT %d] Frame Type is TDD --> not supported by NB-IoT, exiting\n", Mod_id); //correct?
exit(-1); exit_fun("do_SIB1_NB_IoT Frame Type is TDD --> not supported by NB-IoT" );
} }
//FIXME which value chose for the following parameter //FIXME which value chose for the following parameter
...@@ -382,7 +382,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, ...@@ -382,7 +382,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t)); memset(bcch_message,0,sizeof(LTE_BCCH_DL_SCH_Message_NB_t));
} else { } else {
LOG_E(RRC,"[NB-IoT %d] BCCH_MESSAGE_NB is null, exiting\n", Mod_id); LOG_E(RRC,"[NB-IoT %d] BCCH_MESSAGE_NB is null, exiting\n", Mod_id);
exit(-1); exit_fun("do_SIB23_NB_IoT BCCH_MESSAGE_NB is null" );
} }
//before schould be allocated memory somewhere? //before schould be allocated memory somewhere?
......
...@@ -8619,7 +8619,7 @@ int add_ue_to_remove(struct rrc_eNB_ue_context_s **ue_to_be_removed, ...@@ -8619,7 +8619,7 @@ int add_ue_to_remove(struct rrc_eNB_ue_context_s **ue_to_be_removed,
if (removed_ue_count == NUMBER_OF_UE_MAX) { if (removed_ue_count == NUMBER_OF_UE_MAX) {
LOG_E(RRC, "fatal: ue_to_be_removed is full\n"); LOG_E(RRC, "fatal: ue_to_be_removed is full\n");
exit(1); exit_fun("add_ue_to_remove fatal: ue_to_be_removed is full" );
} }
ue_to_be_removed[removed_ue_count] = ue_context_p; ue_to_be_removed[removed_ue_count] = ue_context_p;
...@@ -9139,7 +9139,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) { ...@@ -9139,7 +9139,7 @@ void *rrc_enb_process_itti_msg(void *notUsed) {
break; break;
default: default:
/* cannot come here */ /* cannot come here */
exit(1); exit_fun("rrc_enb_process_itti_msg X2AP_HANDOVER_CANCEL cause error" );
} }
ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_HANDOVER_CANCEL(msg_p).rnti); ue_context_p = rrc_eNB_get_ue_context(RC.rrc[instance], X2AP_HANDOVER_CANCEL(msg_p).rnti);
if (ue_context_p != NULL && if (ue_context_p != NULL &&
......
...@@ -670,5 +670,7 @@ int is_x2ap_enabled(void) ...@@ -670,5 +670,7 @@ int is_x2ap_enabled(void)
mutex_error: mutex_error:
LOG_E(X2AP, "mutex error\n"); LOG_E(X2AP, "mutex error\n");
exit(1); //exit(1);
exit_fun("is_x2ap_enabled mutex error" );
return(-1);
} }
...@@ -1047,7 +1047,8 @@ int x2ap_eNB_generate_x2_handover_cancel (x2ap_eNB_instance_t *instance_p, x2ap_ ...@@ -1047,7 +1047,8 @@ int x2ap_eNB_generate_x2_handover_cancel (x2ap_eNB_instance_t *instance_p, x2ap_
default: default:
/* we can't come here */ /* we can't come here */
X2AP_ERROR("unhandled cancel cause\n"); X2AP_ERROR("unhandled cancel cause\n");
exit(1); exit_fun("x2ap_eNB_generate_x2_handover_cancel unhandled cancel cause" );
break;
} }
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
......
...@@ -1102,7 +1102,8 @@ int x2ap_eNB_handle_handover_cancel (instance_t instance, ...@@ -1102,7 +1102,8 @@ int x2ap_eNB_handle_handover_cancel (instance_t instance,
case X2AP_CauseRadioNetwork_tx2relocoverall_expiry: case X2AP_CauseRadioNetwork_tx2relocoverall_expiry:
cause = X2AP_TX2_RELOC_OVERALL_TIMEOUT; cause = X2AP_TX2_RELOC_OVERALL_TIMEOUT;
break; break;
default: /* can't come here */ //exit(1); default: /* can't come here */
exit_fun("x2ap_eNB_handle_handover_cancel unhandled cancel cause" );
break; break;
} }
......
...@@ -957,7 +957,7 @@ sctp_eNB_read_from_socket( ...@@ -957,7 +957,7 @@ sctp_eNB_read_from_socket(
if (!(flags & MSG_EOR)) { if (!(flags & MSG_EOR)) {
SCTP_ERROR("fatal: partial SCTP messages are not handled\n"); SCTP_ERROR("fatal: partial SCTP messages are not handled\n");
exit(1); exit_fun("fatal: partial SCTP messages are not handled" );
} }
if (flags & MSG_NOTIFICATION) { if (flags & MSG_NOTIFICATION) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment